800
Is there a possibility to expand / collapse all groups (or group by group) at runtime with a method (equivalent to pressing the + or - button in the group header)

Dim oGrid as P
Dim rs as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.SortBarVisible = .t.
oGrid.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
oGrid.AllowGroupBy = .t.
oGrid.Columns.Item(1).SortOrder = 1
oGrid.EndUpdate()
oGrid.BeginUpdate()
oGrid.EnsureVisibleColumn(0)
var_Items = oGrid.Items
	' var_Items.ExpandItem(var_Items.FirstVisibleItem) = .f.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ExpandItem(FirstVisibleItem) = False"

oGrid.EndUpdate()

799
Is there any public method to export the selected data

Dim oGrid as P
Dim var_Column as local
Dim var_Column1 as local
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_Columns = oGrid.Columns
	var_Columns.Add("C1")
	' var_Columns.Add("C2").FormatColumn = "1 index `A-Z`"
	var_Column = var_Columns.Add("C2")
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.FormatColumn = `1 index ``A-Z```"

	' var_Columns.Add("C3").FormatColumn = "100 index ``"
	var_Column1 = var_Columns.Add("C3")
	oGrid.TemplateDef = "dim var_Column1"
	oGrid.TemplateDef = var_Column1
	oGrid.Template = "var_Column1.FormatColumn = `100 index `````"

var_Items = oGrid.Items
	var_Items.AddItem("Item 1")
	' var_Items.SelectItem(var_Items.AddItem("Item 2")) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.SelectItem(AddItem(`Item 2`)) = True"

	var_Items.AddItem("Item 3")
oGrid.EndUpdate()
? "Export CSV Selected Items Only:" 
? oGrid.Export("","sel") 

798
How do I enable the scrollbar-extension, as thumb to be shown outside of the control's client area

Dim oGrid as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ScrollBars = 15
oGrid.Template = "ScrollPartVisible(0,65536) = True" // oGrid.ScrollPartVisible(0,65536) = .t.
oGrid.Template = "ScrollPartVisible(1,65536) = True" // oGrid.ScrollPartVisible(1,65536) = .t.
oGrid.Template = "ScrollPartVisible(2,65536) = True" // oGrid.ScrollPartVisible(2 '2 + ,65536) = .t.
oGrid.ScrollWidth = 4
oGrid.Template = "Background(276) = 15790320" // oGrid.Background(276) = 15790320
oGrid.Template = "Background(260) = 8421504" // oGrid.Background(260) = 8421504
oGrid.ScrollHeight = 4
oGrid.Template = "Background(404) = Background(276)" // oGrid.Background(404) = oGrid.Background(276)
oGrid.Template = "Background(388) = Background(260)" // oGrid.Background(388) = oGrid.Background(260)
oGrid.Template = "Background(511) = Background(276)" // oGrid.Background(511) = oGrid.Background(276)
oGrid.EndUpdate()

797
I need to format a Column with Currency Format, but we use we are using Dhirams (AED)for the Amount. How to do this

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.MarkSearchColumn = .f.
var_Columns = oGrid.Columns
	var_Columns.Add("Name")
	var_Column = var_Columns.Add("Currency")
		var_Column.SortType = 1
		var_Column.AllowSizing = .f.
		var_Column.Width = 64
		var_Column.FormatColumn = "currency(value)"
	var_Column1 = var_Columns.Add("Format")
		var_Column1.SortType = 1
		var_Column1.AllowSizing = .f.
		var_Column1.Width = 64
		var_Column1.FormatColumn = "`AED ` + (value format ``)"
var_Items = oGrid.Items
	h = var_Items.AddItem("Value 1")
	' var_Items.CellValue(h,1) = 10
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = 10"

	' var_Items.CellValue(h,2) = 10
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = 10"

	h = var_Items.AddItem("Value 2")
	' var_Items.CellValue(h,1) = 20
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = 20"

	' var_Items.CellValue(h,2) = 20
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = 20"

oGrid.EndUpdate()

796
How can I have a case-insensitive filter (exFilterDoCaseSensitive flag is not set)

Dim oGrid as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.MarkSearchColumn = .f.
var_Columns = oGrid.Columns
	var_Column = var_Columns.Add("Car")
		var_Column.DisplayFilterButton = .t.
		var_Column.FilterType = 240
		var_Column.Filter = "MAZDA"
	var_Column1 = var_Columns.Add("Equipment")
		var_Column1.DisplayFilterButton = .t.
		var_Column1.DisplayFilterPattern = .f.
		var_Column1.CustomFilter = "Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*"
		var_Column1.FilterType = 3
		var_Column1.Filter = "AIR BAG"
var_Items = oGrid.Items
	' var_Items.CellValue(var_Items.AddItem("Mazda"),1) = "Air Bag"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`Mazda`),1) = `Air Bag`"

	' var_Items.CellValue(var_Items.AddItem("Toyota"),1) = "Air Bag,Air condition"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`Toyota`),1) = `Air Bag,Air condition`"

	' var_Items.CellValue(var_Items.AddItem("Ford"),1) = "Air condition"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`Ford`),1) = `Air condition`"

	' var_Items.CellValue(var_Items.AddItem("Nissan"),1) = "Air Bag,ABS,ESP"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`Nissan`),1) = `Air Bag,ABS,ESP`"

	' var_Items.CellValue(var_Items.AddItem("Mazda"),1) = "Air Bag, ABS,ESP"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`Mazda`),1) = `Air Bag, ABS,ESP`"

	' var_Items.CellValue(var_Items.AddItem("Mazda"),1) = "ABS,ESP"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`Mazda`),1) = `ABS,ESP`"

oGrid.ApplyFilter()
oGrid.EndUpdate()

795
How can I have a case-sensitive filter

Dim oGrid as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.MarkSearchColumn = .f.
var_Columns = oGrid.Columns
	var_Column = var_Columns.Add("Car")
		var_Column.DisplayFilterButton = .t.
		var_Column.FilterType = 496 'exFilterDoCaseSensitive + exFilter
		var_Column.Filter = "Mazda"
	var_Column1 = var_Columns.Add("Equipment")
		var_Column1.DisplayFilterButton = .t.
		var_Column1.DisplayFilterPattern = .f.
		var_Column1.CustomFilter = "Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*"
		var_Column1.FilterType = 259 'exFilterDoCaseSensitive + exPattern
		var_Column1.Filter = "Air Bag"
var_Items = oGrid.Items
	' var_Items.CellValue(var_Items.AddItem("Mazda"),1) = "Air Bag"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`Mazda`),1) = `Air Bag`"

	' var_Items.CellValue(var_Items.AddItem("Toyota"),1) = "Air Bag,Air condition"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`Toyota`),1) = `Air Bag,Air condition`"

	' var_Items.CellValue(var_Items.AddItem("Ford"),1) = "Air condition"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`Ford`),1) = `Air condition`"

	' var_Items.CellValue(var_Items.AddItem("Nissan"),1) = "Air Bag,ABS,ESP"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`Nissan`),1) = `Air Bag,ABS,ESP`"

	' var_Items.CellValue(var_Items.AddItem("Mazda"),1) = "Air Bag, ABS,ESP"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`Mazda`),1) = `Air Bag, ABS,ESP`"

	' var_Items.CellValue(var_Items.AddItem("Mazda"),1) = "ABS,ESP"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`Mazda`),1) = `ABS,ESP`"

oGrid.ApplyFilter()
oGrid.EndUpdate()

794
How can I exclude an item from aggregate/total computation

Dim h as N
Dim oGrid as P
Dim var_Column as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
' oGrid.Columns.Add("Default").Def(17) = 1
var_Column = oGrid.Columns.Add("Default")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.Def(17) = 1"

var_Items = oGrid.Items
	' var_Items.LockedItemCount(0) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.LockedItemCount(0) = 1"

	h = var_Items.LockedItem(0,0)
	' var_Items.CellValue(h,0) = "sum(all,rec,%0)"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,0) = `sum(all,rec,%0)`"

	' var_Items.CellValueFormat(h,0) = 5 'exTotalField + exHTML
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,0) = 5"

	' var_Items.FormatCell(h,0) = "`Sum: ` + (value format ``) "
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = ```Sum: `` + (value format ````) `"

	var_Items.AddItem(10)
	h = var_Items.AddItem(20)
	' var_Items.SortableItem(h) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SortableItem(h) = False"

	' var_Items.FormatCell(h,0) = "value + ` <fgcolor=808080> this item is excluded from aggregate computations</fgcolor>`"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `value + `` <fgcolor=808080> this item is excluded from aggregate computations</fgcolor>```"

	var_Items.AddItem(30)

793
Is is possible to change the default group header to display sum rather than count

Dim oGrid as P
Dim rs as P
Dim var_Column as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HasLines = 0
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.SingleSort = .f.
oGrid.SortBarVisible = .t.
oGrid.AllowGroupBy = .t.
oGrid.Columns.Item(6).AllowGroupBy = .f.
var_Column = oGrid.Columns.Item(1)
	var_Column.GroupByFormatCell = "'<caption> (sum: <b>' + value + '</b>, of Freight)'"
	var_Column.GroupByTotalField = "sum(current,rec,%6)"
	var_Column.SortOrder = .t.
oGrid.EndUpdate()

792
How do I get the caption of the group during the AddGroupItem event

' Occurs after a new Group Item has been inserted to Items collection.
function AddGroupItem as v (Item  as  OLE::Exontrol.Grid.1::HITEM)
	Dim var_Items as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oGrid.Items
		? "Caption:" 
		? var_Items.CellCaption(Item,var_Items.GroupItem(Item)) 
		? "Value:" 
		? var_Items.CellValue(Item,var_Items.GroupItem(Item)) 
end function

Dim oGrid as P
Dim rs as P
Dim var_Column as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HasLines = 0
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.SingleSort = .f.
oGrid.SortBarVisible = .t.
oGrid.AllowGroupBy = .t.
var_Column = oGrid.Columns.Item(1)
	var_Column.GroupByFormatCell = "'<b><caption></b> (' + value + ') group'"
	var_Column.SortOrder = .t.
oGrid.EndUpdate()

791
Is it possible, to add more aggregate functions to grouping header

' Occurs after a new Group Item has been inserted to Items collection.
function AddGroupItem as v (Item  as  OLE::Exontrol.Grid.1::HITEM)
	Dim var_Items as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oGrid.Items
		' var_Items.FormatCell(Item,var_Items.GroupItem(Item)) = "value + ` Min: <b>` + %13 + `</b> Max: <b>` + %14 + `</b> Sum: <b>` + %15 + `</b>, of Freight column`"
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.FormatCell(Item,GroupItem(Item)) = `value + `` Min: <b>`` + %13 + ``</b> Max: <b>`` + %14 + ``</b> Sum: <b>`` + %15 + ``</b>, of Freight column```"
		' var_Items.CellValue(Item,"Min") = "min(current,all,dbl(%6))"
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValue(Item,`Min`) = `min(current,all,dbl(%6))`"
		' var_Items.CellValueFormat(Item,"Min") = 4
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValueFormat(Item,`Min`) = 4"
		' var_Items.CellValue(Item,"Max") = "max(current,all,dbl(%6))"
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValue(Item,`Max`) = `max(current,all,dbl(%6))`"
		' var_Items.CellValueFormat(Item,"Max") = 4
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValueFormat(Item,`Max`) = 4"
		' var_Items.CellValue(Item,"Sum") = "sum(current,all,dbl(%6))"
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValue(Item,`Sum`) = `sum(current,all,dbl(%6))`"
		' var_Items.CellValueFormat(Item,"Sum") = 4
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.CellValueFormat(Item,`Sum`) = 4"

end function

' Occurs when the user changes the cell's content.
function Change as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,NewValue  as  A)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Refresh()
end function

Dim oGrid as P
Dim rs as P
Dim var_Column as local
Dim var_Column1 as local
Dim var_Column2 as local
Dim var_Columns as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HasLines = 0
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.SingleSort = .f.
oGrid.SortBarVisible = .t.
oGrid.AllowGroupBy = .t.
oGrid.Columns.Item(1).SortOrder = .t.
var_Columns = oGrid.Columns
	' var_Columns.Add("Min").Visible = .f.
	var_Column = var_Columns.Add("Min")
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Visible = False"

	' var_Columns.Add("Max").Visible = .f.
	var_Column1 = var_Columns.Add("Max")
	oGrid.TemplateDef = "dim var_Column1"
	oGrid.TemplateDef = var_Column1
	oGrid.Template = "var_Column1.Visible = False"

	' var_Columns.Add("Sum").Visible = .f.
	var_Column2 = var_Columns.Add("Sum")
	oGrid.TemplateDef = "dim var_Column2"
	oGrid.TemplateDef = var_Column2
	oGrid.Template = "var_Column2.Visible = False"

oGrid.EndUpdate()

790
Is it possible to display more aggregate functions to a single cell (method 2)

' Occurs when the user changes the cell's content.
function Change as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,NewValue  as  A)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Refresh()
end function

Dim h as N
Dim oGrid as P
Dim var_Column as local
Dim var_Column1 as local
Dim var_Column2 as local
Dim var_Columns as P
Dim var_Editor as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.SortOnClick = 0
oGrid.LinesAtRoot = 5
oGrid.Indent = 13
oGrid.HeaderVisible = .f.
oGrid.LinesAtRoot = -1
var_Columns = oGrid.Columns
	var_Columns.Add("Items")
	' var_Columns.Add("Quantity").Editor.EditType = 4
	var_Editor = var_Columns.Add("Quantity").Editor
	oGrid.TemplateDef = "dim var_Editor"
	oGrid.TemplateDef = var_Editor
	oGrid.Template = "var_Editor.EditType = 4"

	' var_Columns.Add("Sum").Visible = .f.
	var_Column = var_Columns.Add("Sum")
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Visible = False"

	' var_Columns.Add("Min").Visible = .f.
	var_Column1 = var_Columns.Add("Min")
	oGrid.TemplateDef = "dim var_Column1"
	oGrid.TemplateDef = var_Column1
	oGrid.Template = "var_Column1.Visible = False"

	' var_Columns.Add("Max").Visible = .f.
	var_Column2 = var_Columns.Add("Max")
	oGrid.TemplateDef = "dim var_Column2"
	oGrid.TemplateDef = var_Column2
	oGrid.Template = "var_Column2.Visible = False"

var_Items = oGrid.Items
	h = var_Items.AddItem("Items")
	' var_Items.CellMerge(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellMerge(h,0) = 1"

	' var_Items.FormatCell(h,0) = "`Items, <b>sum(` + %2 + `), min(` + %3 + `), max(` + %4 + `)</b>`"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = ```Items, <b>sum(`` + %2 + ``), min(`` + %3 + ``), max(`` + %4 + ``)</b>```"

	' var_Items.CellValueFormat(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,0) = 1"

	' var_Items.CellValue(h,2) = "sum(current,dir,dbl(%1))"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = `sum(current,dir,dbl(%1))`"

	' var_Items.CellValueFormat(h,2) = 4
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,2) = 4"

	' var_Items.CellValue(h,3) = "min(current,dir,dbl(%1))"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,3) = `min(current,dir,dbl(%1))`"

	' var_Items.CellValueFormat(h,3) = 4
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,3) = 4"

	' var_Items.CellValue(h,4) = "max(current,dir,dbl(%1))"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,4) = `max(current,dir,dbl(%1))`"

	' var_Items.CellValueFormat(h,4) = 4
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,4) = 4"

	' var_Items.CellValue(var_Items.InsertItem(h,,"Item 1"),1) = 10
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(InsertItem(h,,`Item 1`),1) = 10"

	' var_Items.CellValue(var_Items.InsertItem(h,,"Item 2"),1) = 20
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(InsertItem(h,,`Item 2`),1) = 20"

	' var_Items.CellValue(var_Items.InsertItem(h,,"Item 3"),1) = 30
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(InsertItem(h,,`Item 3`),1) = 30"

	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

oGrid.EndUpdate()

789
How can I use the current in the aggregate/total field

' Occurs when the user changes the cell's content.
function Change as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,NewValue  as  A)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Refresh()
end function

Dim h as N
Dim oGrid as P
Dim var_Columns as P
Dim var_Editor as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.SortOnClick = 0
oGrid.LinesAtRoot = 5
oGrid.Indent = 13
oGrid.HeaderVisible = .f.
oGrid.LinesAtRoot = -1
var_Columns = oGrid.Columns
	var_Columns.Add("Items")
	' var_Columns.Add("Quantity").Editor.EditType = 4
	var_Editor = var_Columns.Add("Quantity").Editor
	oGrid.TemplateDef = "dim var_Editor"
	oGrid.TemplateDef = var_Editor
	oGrid.Template = "var_Editor.EditType = 4"

var_Items = oGrid.Items
	h = var_Items.AddItem("Items")
	' var_Items.CellValue(h,1) = "sum(current,dir,dbl(%1))"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `sum(current,dir,dbl(%1))`"

	' var_Items.CellValueFormat(h,1) = 4
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,1) = 4"

	' var_Items.FormatCell(h,1) = "`Total: `+ value"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,1) = ```Total: ``+ value`"

	' var_Items.CellValue(var_Items.InsertItem(h,,"Item 1"),1) = 10
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(InsertItem(h,,`Item 1`),1) = 10"

	' var_Items.CellValue(var_Items.InsertItem(h,,"Item 2"),1) = 20
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(InsertItem(h,,`Item 2`),1) = 20"

	' var_Items.CellValue(var_Items.InsertItem(h,,"Item 3"),1) = 30
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(InsertItem(h,,`Item 3`),1) = 30"

	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

oGrid.EndUpdate()

788
How can I prevent a specified item to be not included in the aggregate/total function

' Occurs when the user changes the cell's content.
function Change as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,NewValue  as  A)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Refresh()
end function

Dim h as N
Dim h1 as N
Dim oGrid as P
Dim var_Editor as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.DrawGridLines = -1
oGrid.SortOnClick = 0
oGrid.LinesAtRoot = 5
oGrid.HasLines = 2
oGrid.HeaderVisible = .f.
' oGrid.Columns.Add("Numbers").Editor.EditType = 4
var_Editor = oGrid.Columns.Add("Numbers").Editor
oGrid.TemplateDef = "dim var_Editor"
oGrid.TemplateDef = var_Editor
oGrid.Template = "var_Editor.EditType = 4"

var_Items = oGrid.Items
	h = var_Items.AddItem("Numbers")
	' var_Items.CellEditorVisible(h,0) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellEditorVisible(h,0) = False"

	' var_Items.ItemBold(var_Items.InsertItem(h,,10)) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemBold(InsertItem(h,,10)) = True"

	' var_Items.ItemBold(var_Items.InsertItem(h,,20)) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemBold(InsertItem(h,,20)) = True"

	' var_Items.ItemBold(var_Items.InsertItem(h,,30)) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemBold(InsertItem(h,,30)) = True"

	h1 = var_Items.InsertItem(h,,"not included")
	' var_Items.CellEditorVisible(h1,0) = .f.
	oGrid.TemplateDef = "dim var_Items,h1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items.CellEditorVisible(h1,0) = False"

	' var_Items.CellValueFormat(h1,0) = 1
	oGrid.TemplateDef = "dim var_Items,h1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items.CellValueFormat(h1,0) = 1"

	' var_Items.CellHAlignment(h1,0) = 2
	oGrid.TemplateDef = "dim var_Items,h1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items.CellHAlignment(h1,0) = 2"

	' var_Items.SortableItem(h1) = .f.
	oGrid.TemplateDef = "dim var_Items,h1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items.SortableItem(h1) = False"

	h1 = var_Items.InsertItem(0,,"sum(all,rec,dbl(%0))")
	' var_Items.ItemBold(h1) = .t.
	oGrid.TemplateDef = "dim var_Items,h1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items.ItemBold(h1) = True"

	' var_Items.SelectableItem(h1) = .f.
	oGrid.TemplateDef = "dim var_Items,h1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items.SelectableItem(h1) = False"

	' var_Items.CellValueFormat(h1,0) = 5 'exTotalField + exHTML
	oGrid.TemplateDef = "dim var_Items,h1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items.CellValueFormat(h1,0) = 5"

	' var_Items.FormatCell(h1,0) = "`Sum: ` + value"
	oGrid.TemplateDef = "dim var_Items,h1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items.FormatCell(h1,0) = ```Sum: `` + value`"

	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

oGrid.EndUpdate()

787
Is is possible to specify which items/cells/fields to be included by the aggregate/total function I am using

' Occurs after a new Item has been inserted to Items collection.
function AddItem as v (Item  as  OLE::Exontrol.Grid.1::HITEM)
	Dim var_Items as local
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	' oGrid.Items.SortableItem(Item) = .f.
	var_Items = oGrid.Items
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.SortableItem(Item) = False"

end function

' Fired after cell's state has been changed.
function CellStateChanged as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N)
	Dim var_Items as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oGrid.Items
		' var_Items.SortableItem(Item) = .f.
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.SortableItem(Item) = CellState(Item,ColIndex)"
	oGrid.Refresh()
end function

' Occurs when the user changes the cell's content.
function Change as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,NewValue  as  A)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Refresh()
end function

Dim h as N
Dim oGrid as P
Dim var_Editor as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.TreeColumnIndex = -1
oGrid.FullRowSelect = 0
oGrid.DrawGridLines = -1
oGrid.SortOnClick = 0
' oGrid.Columns.Add("Check Numbers").Editor.EditType = 4
var_Editor = oGrid.Columns.Add("Check Numbers").Editor
oGrid.TemplateDef = "dim var_Editor"
oGrid.TemplateDef = var_Editor
oGrid.Template = "var_Editor.EditType = 4"

var_Items = oGrid.Items
	' var_Items.CellHasCheckBox(var_Items.AddItem(10),0) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellHasCheckBox(AddItem(10),0) = True"

	h = var_Items.AddItem(20)
	' var_Items.CellHasCheckBox(h,0) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHasCheckBox(h,0) = True"

	' var_Items.CellState(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellState(h,0) = 1"

	' var_Items.CellHasCheckBox(var_Items.AddItem(30),0) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellHasCheckBox(AddItem(30),0) = True"

	h = var_Items.AddItem("sum(all,rec,dbl(%0))")
	' var_Items.SelectableItem(h) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectableItem(h) = False"

	' var_Items.CellValueFormat(h,0) = 5 'exTotalField + exHTML
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,0) = 5"

	' var_Items.FormatCell(h,0) = "`sum on checked items : ` + value"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = ```sum on checked items : `` + value`"

oGrid.EndUpdate()

786
Can I display multiple total/aggregate functions such as sum, min or max, into a single cell (method 1)

' Occurs when the user changes the cell's content.
function Change as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,NewValue  as  A)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Refresh()
end function

Dim h as N
Dim oGrid as P
Dim var_Editor as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.TreeColumnIndex = -1
oGrid.FullRowSelect = 0
oGrid.DrawGridLines = -1
' oGrid.Columns.Add("Numbers").Editor.EditType = 4
var_Editor = oGrid.Columns.Add("Numbers").Editor
oGrid.TemplateDef = "dim var_Editor"
oGrid.TemplateDef = var_Editor
oGrid.Template = "var_Editor.EditType = 4"

var_Items = oGrid.Items
	var_Items.AddItem(10)
	var_Items.AddItem(20)
	var_Items.AddItem(30)
	h = var_Items.AddItem("sum(all,rec,dbl(%0))")
	' var_Items.SelectableItem(h) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectableItem(h) = False"

	' var_Items.CellValueFormat(h,0) = 5 'exTotalField + exHTML
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,0) = 5"

	' var_Items.FormatCell(h,0) = "`sum: ` + value"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = ```sum: `` + value`"

	h = var_Items.SplitCell(h,0)
	' var_Items.CellValue(0,h) = "min(all,rec,dbl(%0))"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(0,h) = `min(all,rec,dbl(%0))`"

	' var_Items.CellValueFormat(0,h) = 5 'exTotalField + exHTML
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(0,h) = 5"

	' var_Items.FormatCell(0,h) = "`min: ` + value"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(0,h) = ```min: `` + value`"

	h = var_Items.SplitCell(0,h)
	' var_Items.CellValue(0,h) = "max(all,rec,dbl(%0))"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(0,h) = `max(all,rec,dbl(%0))`"

	' var_Items.CellValueFormat(0,h) = 5 'exTotalField + exHTML
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(0,h) = 5"

	' var_Items.FormatCell(0,h) = "`max: ` + value"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(0,h) = ```max: `` + value`"

oGrid.EndUpdate()

785
How can I use the index of the item in total/aggregate functions, rather than root or parent

' Occurs when the user changes the cell's content.
function Change as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,NewValue  as  A)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Refresh()
end function

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Editor as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.TreeColumnIndex = -1
oGrid.FullRowSelect = 0
' oGrid.Columns.Add("Numbers").Editor.EditType = 4
var_Editor = oGrid.Columns.Add("Numbers").Editor
oGrid.TemplateDef = "dim var_Editor"
oGrid.TemplateDef = var_Editor
oGrid.Template = "var_Editor.EditType = 4"

var_Column = oGrid.Columns.Add("Idx")
	var_Column.FormatColumn = "0 index ``"
	var_Column.Width = 24
	var_Column.AllowSizing = .f.
	var_Column.Enabled = .f.
var_Items = oGrid.Items
	h = var_Items.AddItem("3 Numbers")
	' var_Items.ItemHeight(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemHeight(h) = 0"

	' var_Items.SelectableItem(h) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectableItem(h) = False"

	var_Items.InsertItem(h,,10)
	var_Items.InsertItem(h,,20)
	var_Items.InsertItem(h,,30)
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("sum(0,dir,dbl(%0))")
	' var_Items.CellValueFormat(h,0) = 5 'exTotalField + exHTML
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,0) = 5"

	' var_Items.SelectableItem(h) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectableItem(h) = False"

	' var_Items.FormatCell(h,0) = "`sum of first three numbers is ` + value"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = ```sum of first three numbers is `` + value`"

	h = var_Items.AddItem("3 Numbers")
	' var_Items.ItemHeight(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemHeight(h) = 0"

	' var_Items.SelectableItem(h) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectableItem(h) = False"

	var_Items.InsertItem(h,,15)
	var_Items.InsertItem(h,,35)
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("count(5,dir,dbl(%0))")
	' var_Items.CellValueFormat(h,0) = 5 'exTotalField + exHTML
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,0) = 5"

	' var_Items.SelectableItem(h) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectableItem(h) = False"

	' var_Items.FormatCell(h,0) = "`count of next two numbers is ` + value"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = ```count of next two numbers is `` + value`"

oGrid.EndUpdate()

784
How can I have a better view of what current, parent, all, dir or rec means in total/aggregate fields

' Occurs when the user changes the cell's content.
function Change as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,NewValue  as  A)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Refresh()
end function

Dim h as N
Dim h1 as N
Dim oGrid as P
Dim var_Editor as local
Dim var_Items as P
Dim var_Items1 as P
Dim var_Items2 as P
Dim var_Items3 as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = 1
' oGrid.Columns.Add("Numbers").Editor.EditType = 4
var_Editor = oGrid.Columns.Add("Numbers").Editor
oGrid.TemplateDef = "dim var_Editor"
oGrid.TemplateDef = var_Editor
oGrid.Template = "var_Editor.EditType = 4"

var_Items = oGrid.Items
	h = var_Items.AddItem("")
	' var_Items.CellValue(h,0) = "sum(current,dir,dbl(%0))"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,0) = `sum(current,dir,dbl(%0))`"

	' var_Items.CellValueFormat(h,0) = 5 'exTotalField + exHTML
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,0) = 5"

	' var_Items.FormatCell(h,0) = "'sum of <fgcolor=FF0000><b>Direct</b> children: '+value + `</fgcolor> using <a>sum(current,dir,dbl(%0))`"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.FormatCell(h,0) = `'sum of <fgcolor=FF0000><b>Direct</b> children: '+value + ``</fgcolor> using <a>sum(current,dir,dbl(%0))```"

	' var_Items.ItemForeColor(var_Items.InsertItem(h,,10)) = 255
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemForeColor(InsertItem(h,,10)) = 255"

	' var_Items.ItemForeColor(var_Items.InsertItem(h,,20)) = 255
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemForeColor(InsertItem(h,,20)) = 255"

	' var_Items.ItemForeColor(var_Items.InsertItem(h,,30)) = 255
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemForeColor(InsertItem(h,,30)) = 255"

	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

var_Items1 = oGrid.Items
	h = var_Items1.AddItem("")
	' var_Items1.CellValue(h,0) = "sum(current,rec,dbl(%0))"
	oGrid.TemplateDef = "dim var_Items1,h"
	oGrid.TemplateDef = var_Items1
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items1.CellValue(h,0) = `sum(current,rec,dbl(%0))`"

	' var_Items1.CellValueFormat(h,0) = 5 'exTotalField + exHTML
	oGrid.TemplateDef = "dim var_Items1,h"
	oGrid.TemplateDef = var_Items1
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items1.CellValueFormat(h,0) = 5"

	' var_Items1.FormatCell(h,0) = "'sum of <fgcolor=00FF00><b>Leaf</b> chidlren: '+value +`</fgcolor> using <a>sum(current,rec,dbl(%0))`"
	oGrid.TemplateDef = "dim var_Items1,h"
	oGrid.TemplateDef = var_Items1
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items1.FormatCell(h,0) = `'sum of <fgcolor=00FF00><b>Leaf</b> chidlren: '+value +``</fgcolor> using <a>sum(current,rec,dbl(%0))```"

	' var_Items1.ItemForeColor(var_Items1.InsertItem(var_Items1.InsertItem(var_Items1.InsertItem(var_Items1.InsertItem(h,,100),,10),,10),,1)) = 65280
	oGrid.TemplateDef = "dim var_Items1"
	oGrid.TemplateDef = var_Items1
	oGrid.Template = "var_Items1.ItemForeColor(InsertItem(InsertItem(InsertItem(InsertItem(h,,100),,10),,10),,1)) = 65280"

	' var_Items1.ItemForeColor(var_Items1.InsertItem(var_Items1.InsertItem(h,,200),,2)) = 65280
	oGrid.TemplateDef = "dim var_Items1"
	oGrid.TemplateDef = var_Items1
	oGrid.Template = "var_Items1.ItemForeColor(InsertItem(InsertItem(h,,200),,2)) = 65280"

	' var_Items1.ItemForeColor(var_Items1.InsertItem(var_Items1.InsertItem(h,,300),,3)) = 65280
	oGrid.TemplateDef = "dim var_Items1"
	oGrid.TemplateDef = var_Items1
	oGrid.Template = "var_Items1.ItemForeColor(InsertItem(InsertItem(h,,300),,3)) = 65280"

	h1 = var_Items1.InsertItem(h,,"sum(parent,direct,%0)")
	' var_Items1.CellValueFormat(h1,0) = 5 'exTotalField + exHTML
	oGrid.TemplateDef = "dim var_Items1,h1"
	oGrid.TemplateDef = var_Items1
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items1.CellValueFormat(h1,0) = 5"

	' var_Items1.FormatCell(h1,0) = "'sum of <b>Parent Direct</b> children: '+value +`</fgcolor> using <a>sum(parent,direct,%0)`"
	oGrid.TemplateDef = "dim var_Items1,h1"
	oGrid.TemplateDef = var_Items1
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items1.FormatCell(h1,0) = `'sum of <b>Parent Direct</b> children: '+value +``</fgcolor> using <a>sum(parent,direct,%0)```"

	h1 = var_Items1.InsertItem(h,,"sum(parent,rec,%0)")
	' var_Items1.CellValueFormat(h1,0) = 5 'exTotalField + exHTML
	oGrid.TemplateDef = "dim var_Items1,h1"
	oGrid.TemplateDef = var_Items1
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items1.CellValueFormat(h1,0) = 5"

	' var_Items1.FormatCell(h1,0) = "'sum of <fgcolor=00FF00><b>Parent Leaf</b> children: '+value +`</fgcolor> using <a>sum(parent,rec,%0)`"
	oGrid.TemplateDef = "dim var_Items1,h1"
	oGrid.TemplateDef = var_Items1
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items1.FormatCell(h1,0) = `'sum of <fgcolor=00FF00><b>Parent Leaf</b> children: '+value +``</fgcolor> using <a>sum(parent,rec,%0)```"

	' var_Items1.ExpandItem(0) = .t.
	oGrid.TemplateDef = "dim var_Items1"
	oGrid.TemplateDef = var_Items1
	oGrid.Template = "var_Items1.ExpandItem(0) = True"

var_Items2 = oGrid.Items
	h = var_Items2.AddItem("")
	' var_Items2.CellValue(h,0) = "sum(all,rec,dbl(%0))"
	oGrid.TemplateDef = "dim var_Items2,h"
	oGrid.TemplateDef = var_Items2
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items2.CellValue(h,0) = `sum(all,rec,dbl(%0))`"

	' var_Items2.CellValueFormat(h,0) = 5 'exTotalField + exHTML
	oGrid.TemplateDef = "dim var_Items2,h"
	oGrid.TemplateDef = var_Items2
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items2.CellValueFormat(h,0) = 5"

	' var_Items2.FormatCell(h,0) = "'sum of <fgcolor=FF00FF><b>All (leaf children)</b>: '+value  +`</fgcolor> using <a>sum(all,rec,dbl(%0))`"
	oGrid.TemplateDef = "dim var_Items2,h"
	oGrid.TemplateDef = var_Items2
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items2.FormatCell(h,0) = `'sum of <fgcolor=FF00FF><b>All (leaf children)</b>: '+value  +``</fgcolor> using <a>sum(all,rec,dbl(%0))```"

var_Items3 = oGrid.Items
	h = var_Items3.AddItem("")
	' var_Items3.CellValue(h,0) = "sum(all,all,dbl(%0))"
	oGrid.TemplateDef = "dim var_Items3,h"
	oGrid.TemplateDef = var_Items3
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items3.CellValue(h,0) = `sum(all,all,dbl(%0))`"

	' var_Items3.CellValueFormat(h,0) = 5 'exTotalField + exHTML
	oGrid.TemplateDef = "dim var_Items3,h"
	oGrid.TemplateDef = var_Items3
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items3.CellValueFormat(h,0) = 5"

	' var_Items3.FormatCell(h,0) = "'sum of <fgcolor=FF00FF><b>All (children)</b>: '+value  +`</fgcolor> using <a>sum(all,all,dbl(%0))`"
	oGrid.TemplateDef = "dim var_Items3,h"
	oGrid.TemplateDef = var_Items3
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items3.FormatCell(h,0) = `'sum of <fgcolor=FF00FF><b>All (children)</b>: '+value  +``</fgcolor> using <a>sum(all,all,dbl(%0))```"

oGrid.EndUpdate()

783
Do you have any Fit-To-Page options when printing the control

Dim oGrid as P
Dim rs as P
Dim var_Print as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.ColumnAutoResize = .f.
oGrid.ContinueColumnScroll = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
var_Print = OLE.Create("Exontrol.Print")
	var_Print.Options = "FitToPage = On"
	var_Print.PrintExt = oGrid
	var_Print.Preview()

782
How do I hide the selection

Dim oGrid as P
Dim var_Column as P
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.MarkSearchColumn = .f.
oGrid.SelForeColor = oGrid.ForeColor
oGrid.SelBackColor = oGrid.BackColor
oGrid.ShowFocusRect = .f.
var_Columns = oGrid.Columns
	var_Column = var_Columns.Add("Format")
		var_Column.FormatColumn = "type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=0000FF>+'+(value format '2|.|3|,' ): '0.00') )"
		' var_Column.Def(17) = 1
		oGrid.TemplateDef = "dim var_Column"
		oGrid.TemplateDef = var_Column
		oGrid.Template = "var_Column.Def(17) = 1"

var_Items = oGrid.Items
	var_Items.AddItem(10)
	var_Items.AddItem(-8)
oGrid.EndUpdate()

781
How do I access the cells, or how do I get the values in the columns

Dim h as N
Dim oGrid as P
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
var_Columns = oGrid.Columns
	var_Columns.Add("C1")
	var_Columns.Add("C2")
	var_Columns.Add("C3")
var_Items = oGrid.Items
	h = var_Items.AddItem("Item 1")
	' var_Items.CellValue(h,1) = "SubItem 1.1"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `SubItem 1.1`"

	' var_Items.CellValue(h,2) = "SubItem 1.2"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = `SubItem 1.2`"

	? var_Items.CellValue(h,2) 

780
I am using the FormatColumn/FormatCell to format my columns. Is it possible to ignore the SelForeColor, so the foreground color for selected items does not override my settings

' Fired after a new item has been selected.
function SelectionChanged as v ()
	Dim var_Items as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oGrid.Items
		var_Items.ClearItemBackColor(0)
		' var_Items.ItemBackColor(var_Items.SelectedItem(0)) = 16777088
		oGrid.TemplateDef = "dim var_Items"
		oGrid.TemplateDef = var_Items
		oGrid.Template = "var_Items.ItemBackColor(SelectedItem(0)) = 16777088"

end function

Dim oGrid as P
Dim var_Column as P
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.MarkSearchColumn = .f.
oGrid.SelForeColor = oGrid.ForeColor
oGrid.SelBackColor = oGrid.BackColor
oGrid.ShowFocusRect = .f.
var_Columns = oGrid.Columns
	var_Column = var_Columns.Add("Format")
		var_Column.FormatColumn = "type(value) in (0,1) ? 'null' : ( dbl(value)<0 ? '<fgcolor=FF0000>'+ (value format '2|.|3|,|1' ) : (dbl(value)>0 ? '<fgcolor=0000FF>+'+(value format '2|.|3|,' ): '0.00') )"
		' var_Column.Def(17) = 1
		oGrid.TemplateDef = "dim var_Column"
		oGrid.TemplateDef = var_Column
		oGrid.Template = "var_Column.Def(17) = 1"

var_Items = oGrid.Items
	var_Items.AddItem(10)
	var_Items.AddItem(-8)
oGrid.EndUpdate()

779
How can I get the number of columns being shown in the control's SortBar part

Dim oGrid as P
Dim rs as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.SingleSort = .f.
oGrid.SortBarVisible = .t.
oGrid.Columns.Item(1).SortOrder = .t.
oGrid.Columns.Item(2).SortOrder = .t.
? oGrid.Columns.SortBarColumnsCount 
oGrid.EndUpdate()

778
How can I add a header and footer for grouping items

' Occurs after a new Group Item has been inserted to Items collection.
function AddGroupItem as v (Item  as  OLE::Exontrol.Grid.1::HITEM)
	Dim h as N
	Dim var_Items as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oGrid.Items
		h = var_Items.InsertItem(Item,,"")
		' var_Items.SelectableItem(h) = .f.
		oGrid.TemplateDef = "dim var_Items,h"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = h
		oGrid.Template = "var_Items.SelectableItem(h) = False"
		' var_Items.CellValue(h,6) = "min(parent,rec,dbl(%6))"
		oGrid.TemplateDef = "dim var_Items,h"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = h
		oGrid.Template = "var_Items.CellValue(h,6) = `min(parent,rec,dbl(%6))`"
		' var_Items.CellValueFormat(h,6) = 5 'exTotalField + exHTML
		oGrid.TemplateDef = "dim var_Items,h"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = h
		oGrid.Template = "var_Items.CellValueFormat(h,6) = 5"
		' var_Items.FormatCell(h,6) = "`<font ;7><b>Min</b>: ` + value"
		oGrid.TemplateDef = "dim var_Items,h"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = h
		oGrid.Template = "var_Items.FormatCell(h,6) = ```<font ;7><b>Min</b>: `` + value`"
		' var_Items.ItemPosition(h) = 0
		oGrid.TemplateDef = "dim var_Items,h"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = h
		oGrid.Template = "var_Items.ItemPosition(h) = 0"
		h = var_Items.InsertItem(Item,,"")
		' var_Items.SelectableItem(h) = .f.
		oGrid.TemplateDef = "dim var_Items,h"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = h
		oGrid.Template = "var_Items.SelectableItem(h) = False"
		' var_Items.CellValue(h,6) = "max(parent,rec,dbl(%6))"
		oGrid.TemplateDef = "dim var_Items,h"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = h
		oGrid.Template = "var_Items.CellValue(h,6) = `max(parent,rec,dbl(%6))`"
		' var_Items.CellValueFormat(h,6) = 5 'exTotalField + exHTML
		oGrid.TemplateDef = "dim var_Items,h"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = h
		oGrid.Template = "var_Items.CellValueFormat(h,6) = 5"
		' var_Items.FormatCell(h,6) = "`<font ;7><b>Max</b>: ` + value"
		oGrid.TemplateDef = "dim var_Items,h"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = h
		oGrid.Template = "var_Items.FormatCell(h,6) = ```<font ;7><b>Max</b>: `` + value`"

end function

Dim oGrid as P
Dim rs as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HasLines = 0
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.SingleSort = .f.
oGrid.SortBarVisible = .t.
oGrid.AllowGroupBy = .t.
oGrid.Columns.Item(1).SortOrder = .t.
oGrid.EndUpdate()

777
How can I add a footer for grouping items

' Occurs after a new Group Item has been inserted to Items collection.
function AddGroupItem as v (Item  as  OLE::Exontrol.Grid.1::HITEM)
	Dim h as N
	Dim var_Items as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oGrid.Items
		h = var_Items.InsertItem(Item,,"")
		' var_Items.SelectableItem(h) = .f.
		oGrid.TemplateDef = "dim var_Items,h"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = h
		oGrid.Template = "var_Items.SelectableItem(h) = False"
		' var_Items.CellValue(h,6) = "sum(parent,rec,dbl(%6))"
		oGrid.TemplateDef = "dim var_Items,h"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = h
		oGrid.Template = "var_Items.CellValue(h,6) = `sum(parent,rec,dbl(%6))`"
		' var_Items.CellValueFormat(h,6) = 5 'exTotalField + exHTML
		oGrid.TemplateDef = "dim var_Items,h"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = h
		oGrid.Template = "var_Items.CellValueFormat(h,6) = 5"
		' var_Items.FormatCell(h,6) = "`<font ;7><b>Sum</b>: ` + value"
		oGrid.TemplateDef = "dim var_Items,h"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = h
		oGrid.Template = "var_Items.FormatCell(h,6) = ```<font ;7><b>Sum</b>: `` + value`"

end function

Dim oGrid as P
Dim rs as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.HasLines = 0
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.SingleSort = .f.
oGrid.SortBarVisible = .t.
oGrid.AllowGroupBy = .t.
oGrid.Columns.Item(1).SortOrder = .t.
oGrid.EndUpdate()

776
How can I handle the event for the inside controls

' Fired when an ActiveX control hosted by an item has fired an event.
function ItemOleEvent as v (Item  as  OLE::Exontrol.Grid.1::HITEM,Ev  as  OLE::Exontrol.Grid.1::IOleEvent)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? Ev 
end function

Dim h as N
Dim oGrid as P
Dim var_Grid as P
Dim var_Grid1 as P
Dim var_Items as P
Dim var_Items1 as P
Dim var_Items2 as local
Dim var_Items3 as P
Dim var_Items4 as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.LinesAtRoot = -1
oGrid.ScrollBySingleLine = .t.
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.InsertControlItem(h,"Exontrol.Grid")
	' var_Items.ItemHeight(h) = 256
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemHeight(h) = 256"

	var_Grid = var_Items.ItemObject(h)
		var_Grid.LinesAtRoot = -1
		var_Grid.ScrollBySingleLine = .t.
		var_Grid.Columns.Add("C1")
		var_Grid.Columns.Add("C2")
		var_Items1 = var_Grid.Items
			' var_Items1.CellValue(var_Items1.AddItem(1),1) = 2
			oGrid.TemplateDef = "dim var_Items1"
			oGrid.TemplateDef = var_Items1
			oGrid.Template = "var_Items1.CellValue(AddItem(1),1) = 2"

		h = var_Grid.Items.AddItem(3)
		' var_Grid.Items.CellValue(h,1) = 4
		var_Items2 = var_Grid.Items
		oGrid.TemplateDef = "dim var_Items2"
		oGrid.TemplateDef = var_Items2
		oGrid.Template = "var_Items2.CellValue(h,1) = 4"

		var_Items3 = var_Grid.Items
			' var_Items3.ExpandItem(h) = .t.
			oGrid.TemplateDef = "dim var_Items3,h"
			oGrid.TemplateDef = var_Items3
			oGrid.TemplateDef = h
			oGrid.Template = "var_Items3.ExpandItem(h) = True"

			h = var_Items3.InsertControlItem(h,"Exontrol.Grid")
			var_Grid1 = var_Items3.ItemObject(h)
				var_Grid1.LinesAtRoot = -1
				var_Grid1.Columns.Add("Inside-Inside")
				var_Items4 = var_Grid1.Items
					h = var_Items4.AddItem("item")
					var_Items4.InsertItem(h,,"child 1")
					var_Items4.InsertItem(h,,"child 2")
					var_Items4.InsertItem(h,,"child 3")

775
How can I specify the position of the item manually (Method 2)

Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	var_Items.AddItem("Child 3")
	var_Items.AddItem("Child 2")
	var_Items.AddItem("Child 1")
	' var_Items.ItemPosition(var_Items.ItemByIndex(0)) = 2
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemPosition(ItemByIndex(0)) = 2"

	' var_Items.ItemPosition(var_Items.ItemByIndex(1)) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemPosition(ItemByIndex(1)) = 1"

	' var_Items.ItemPosition(var_Items.ItemByIndex(2)) = 0
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemPosition(ItemByIndex(2)) = 0"


774
How can I specify the position of the item manually (Method 1)

Dim h1 as N
Dim h2 as N
Dim h3 as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h3 = var_Items.AddItem("Child 3")
	h2 = var_Items.AddItem("Child 2")
	h1 = var_Items.AddItem("Child 1")
	' var_Items.ItemPosition(h3) = 2
	oGrid.TemplateDef = "dim var_Items,h3"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h3
	oGrid.Template = "var_Items.ItemPosition(h3) = 2"

	' var_Items.ItemPosition(h2) = 1
	oGrid.TemplateDef = "dim var_Items,h2"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h2
	oGrid.Template = "var_Items.ItemPosition(h2) = 1"

	' var_Items.ItemPosition(h1) = 0
	oGrid.TemplateDef = "dim var_Items,h1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items.ItemPosition(h1) = 0"


773
Is it possible to open second inside grid in inside-grid

Dim h as N
Dim oGrid as P
Dim var_Grid as P
Dim var_Grid1 as P
Dim var_Items as P
Dim var_Items1 as P
Dim var_Items2 as local
Dim var_Items3 as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.LinesAtRoot = -1
oGrid.ScrollBySingleLine = .t.
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.InsertControlItem(h,"Exontrol.Grid")
	' var_Items.ItemHeight(h) = 256
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemHeight(h) = 256"

	var_Grid = var_Items.ItemObject(h)
		var_Grid.LinesAtRoot = -1
		var_Grid.ScrollBySingleLine = .t.
		var_Grid.Columns.Add("C1")
		var_Grid.Columns.Add("C2")
		var_Items1 = var_Grid.Items
			' var_Items1.CellValue(var_Items1.AddItem(1),1) = 2
			oGrid.TemplateDef = "dim var_Items1"
			oGrid.TemplateDef = var_Items1
			oGrid.Template = "var_Items1.CellValue(AddItem(1),1) = 2"

		h = var_Grid.Items.AddItem(3)
		' var_Grid.Items.CellValue(h,1) = 4
		var_Items2 = var_Grid.Items
		oGrid.TemplateDef = "dim var_Items2"
		oGrid.TemplateDef = var_Items2
		oGrid.Template = "var_Items2.CellValue(h,1) = 4"

		var_Items3 = var_Grid.Items
			' var_Items3.ExpandItem(h) = .t.
			oGrid.TemplateDef = "dim var_Items3,h"
			oGrid.TemplateDef = var_Items3
			oGrid.TemplateDef = h
			oGrid.Template = "var_Items3.ExpandItem(h) = True"

			h = var_Items3.InsertControlItem(h,"Exontrol.Grid")
			var_Grid1 = var_Items3.ItemObject(h)
				var_Grid1.Columns.Add("Inside-Inside")
				var_Grid1.Items.AddItem("item")

772
Computed field concatating strings values to calculated values. Is there something we can change this

Dim oGrid as P
Dim var_Column as local
Dim var_Column1 as local
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
var_Columns = oGrid.Columns
	var_Columns.Add("A")
	var_Columns.Add("B")
	' var_Columns.Add("Sum").ComputedField = "dbl(%0) + dbl(%1)"
	var_Column = var_Columns.Add("Sum")
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.ComputedField = `dbl(%0) + dbl(%1)`"

	' var_Columns.Add("Concaternation").ComputedField = "str(%0) + str(%1)"
	var_Column1 = var_Columns.Add("Concaternation")
	oGrid.TemplateDef = "dim var_Column1"
	oGrid.TemplateDef = var_Column1
	oGrid.Template = "var_Column1.ComputedField = `str(%0) + str(%1)`"

var_Items = oGrid.Items
	' var_Items.CellValue(var_Items.AddItem(1),1) = 2
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(1),1) = 2"

	' var_Items.CellValue(var_Items.AddItem(21),1) = 22
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(21),1) = 22"


771
Is it possible the Items.FormatCell or Column.FormatColumn to use values from other columns

Dim oGrid as P
Dim var_Column as local
Dim var_Column1 as local
Dim var_Columns as P
Dim var_Editor as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
var_Columns = oGrid.Columns
	' var_Columns.Add("A").Editor.EditType = 4
	var_Editor = var_Columns.Add("A").Editor
	oGrid.TemplateDef = "dim var_Editor"
	oGrid.TemplateDef = var_Editor
	oGrid.Template = "var_Editor.EditType = 4"

	' var_Columns.Add("B").FormatColumn = "currency(%0)"
	var_Column = var_Columns.Add("B")
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.FormatColumn = `currency(%0)`"

	' var_Columns.Add("C").FormatColumn = "%1 format ''"
	var_Column1 = var_Columns.Add("C")
	oGrid.TemplateDef = "dim var_Column1"
	oGrid.TemplateDef = var_Column1
	oGrid.Template = "var_Column1.FormatColumn = `%1 format ''`"

var_Items = oGrid.Items
	var_Items.AddItem(1)
	var_Items.AddItem(2)
	var_Items.AddItem(3)

770
Is it possible to do un-grouping the items

' Occurs when the user presses and then releases the left mouse button over the grid control.
function Click as v ()
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Ungroup()
end function

Dim oGrid as P
Dim rs as P
Dim var_Column as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.SortBarHeight = 24
oGrid.HeaderHeight = 24
oGrid.SortBarVisible = .t.
oGrid.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
oGrid.AllowGroupBy = .t.
oGrid.ReadOnly = -1
var_Column = oGrid.Columns.Item(1)
	var_Column.Alignment = 1
	' var_Column.Def(4) = 15790320
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(4) = 15790320"

	var_Column.SortOrder = .t.
oGrid.EndUpdate()

769
How can I change the visual aspect of the links in the sort bar

Dim oGrid as P
Dim rs as P
Dim var_Column as P
Dim var_Column1 as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.SortBarHeight = 24
oGrid.HeaderHeight = 24
oGrid.BackColorSortBar = 15790320
oGrid.BackColorSortBarCaption = oGrid.BackColor
oGrid.VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAEGg4BdsIQAAYAQGKIYBkAKBQAGaAoDDgNw0QwAAxjMK0EwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQiiCYsS5GQBSFDcOwHGyQYDkCQpAAWL4tCyMc7QHKAWhrEAbJjgQYJUh+TQAAZCIJRXRQAL/K6rKwnSCQIgkUBpGKdBynEYoYxAfyESCJWyIahWAwoQjUMB1HLQAAxC5kKbkIxyBABFBdVjVeBYG78Bz+ABjEovbAMEwPBqAMwmIAZDheA4FR4AGhTXKcbxrFaXZSzKckPRoADSZq1Sg5LjDJI2ABqU6ABqNLZtJKsZS4apABrWeZ3Q7QMLdFTwA4PH6EZhxXAYbTVeaPZjQIBAgI")
oGrid.SortBarVisible = .t.
oGrid.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
oGrid.AllowGroupBy = .t.
var_Column = oGrid.Columns.Item(1)
	var_Column.Alignment = 1
	' var_Column.Def(4) = 15790320
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(4) = 15790320"

	var_Column.SortOrder = .t.
var_Column1 = oGrid.Columns.Item(5)
	var_Column1.Alignment = 1
	' var_Column1.Def(4) = 16119285
	oGrid.TemplateDef = "dim var_Column1"
	oGrid.TemplateDef = var_Column1
	oGrid.Template = "var_Column1.Def(4) = 16119285"

	var_Column1.SortOrder = .t.
oGrid.Template = "Background(28) = 16777216" // oGrid.Background(28) = 16777216
oGrid.EndUpdate()

768
Is it possible to display no +/- button for grouped items

Dim oGrid as P
Dim rs as P
Dim var_Column as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.SortBarVisible = .t.
oGrid.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
oGrid.AllowGroupBy = .t.
var_Column = oGrid.Columns.Item(1)
	var_Column.Alignment = 1
	' var_Column.Def(4) = 15790320
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(4) = 15790320"

oGrid.EndUpdate()

767
How can I remove the extra information that grouped items display

Dim oGrid as P
Dim rs as P
Dim var_Column as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = 5
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.SortBarVisible = .t.
oGrid.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
oGrid.AllowGroupBy = .t.
oGrid.Columns.Item(6).AllowGroupBy = .f.
var_Column = oGrid.Columns.Item(1)
	var_Column.GroupByTotalField = ""
	var_Column.GroupByFormatCell = ""
oGrid.EndUpdate()

766
How can I change the label, caption or the formula of the grouped items

' Occurs after a new Item has been inserted to Items collection.
function AddItem as v (Item  as  OLE::Exontrol.Grid.1::HITEM)
	Dim var_Items as local
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	' oGrid.Items.ItemDividerLineAlignment(Item) = 3
	var_Items = oGrid.Items
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemDividerLineAlignment(Item) = 3"

end function

' Occurs when the user changes the cell's content.
function Change as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,NewValue  as  A)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Refresh()
end function

Dim oGrid as P
Dim rs as P
Dim var_Column as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ScrollBySingleLine = .t.
oGrid.LinesAtRoot = 5
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.SortBarVisible = .t.
oGrid.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
oGrid.AllowGroupBy = .t.
oGrid.Columns.Item(6).AllowGroupBy = .f.
var_Column = oGrid.Columns.Item(1)
	var_Column.GroupByTotalField = "sum(current,rec,%6)"
	var_Column.GroupByFormatCell = "'<font ;11>' + <caption> + '</font> <fgcolor=808080>( Freight: ' + currency(value) + ')'"
oGrid.DefaultItemHeight = 28
oGrid.EndUpdate()

765
How can I change the aspect of grouped items

' Occurs after a new Item has been inserted to Items collection.
function AddItem as v (Item  as  OLE::Exontrol.Grid.1::HITEM)
	Dim l as 
	Dim var_Items as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oGrid.Items
		' var_Items.ItemDividerLine(Item) = 0
		oGrid.TemplateDef = "dim var_Items,Item"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.Template = "var_Items.ItemDividerLine(Item) = 0"
		l = var_Items.GroupItem(Item)
		' var_Items.CellSingleLine(Item,l) = .f.
		oGrid.TemplateDef = "dim var_Items,Item,l"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.TemplateDef = l
		oGrid.Template = "var_Items.CellSingleLine(Item,l) = False"
		' var_Items.CellBold(Item,l) = .t.
		oGrid.TemplateDef = "dim var_Items,Item,l"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.TemplateDef = l
		oGrid.Template = "var_Items.CellBold(Item,l) = True"
		' var_Items.CellBackColor(Item,l) = 16777216
		oGrid.TemplateDef = "dim var_Items,Item,l"
		oGrid.TemplateDef = var_Items
		oGrid.TemplateDef = Item
		oGrid.TemplateDef = l
		oGrid.Template = "var_Items.CellBackColor(Item,l) = 16777216"

end function

Dim oGrid as P
Dim rs as P
Dim var_Column as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ScrollBySingleLine = .t.
oGrid.LinesAtRoot = 0
oGrid.TreeColumnIndex = -1
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAEGg4BKoCg6AADACAxRDAMgBQKAAzQFAYcBuGiGAAGMZhWgmFgAQhFcZQSKUOQTDKMIziaQIRDEMw5SSNIxyAK0QBkAqNQCkKKwIgmNYDSBMYABBIMBwiGQaRJnegYRDUMJCQjRVITVLMNoXDKZIyqEAHfpWVJWSLHcIhDBJUjcOYyTiOQrzCK8dB0G6bIrGEZpYRAPwEYDIIjbQhqFYDChCNLwHScEAxC4kLhnKK6Vb9d6HYhiOJYXhmDrfR7IMhyLI8QafFqXZhmOZZXizPY9T7QNB0LQ8eZbJqnahqOpaOx2W5dV7YNh2LTWGzXNq3bhuOzLbrme59X7gOB3RZeE4XRrHchxKq8XxnG6dZ7oOTUXofFOK5WmudQTh2LpfHOO5em+doSh4LwfhOS5mnGIw9D6LxfjOW5unSIQ+D8L4flOa5yD2fg/D+L5fnOe54ByigGAKAJgEgBBrgGYIICYCoCmCSAcGOA5hAgRgSgSYQBGoFoFmGCBmBqBphGESgegeYgIgYIoHkSKIWCaCZigiJgqgqYhog4LoLmGSJGDKBZhEiVg2gMY4ImYCIBGOSJ1n6D5kAeZZ2hCZBHj4RoRl6J4eEqEpeAkNhOHaXYJEYUh0GUSRVkwchlgkZZChaZZGnWOoXmYBpOGKGJamaLhmhmWhJiYahnlmSY2G4ZZZEmRhyGMZxJlWCBhFCFgWHaHpYkmSh+GSJp6AWG4amgRoOGeIZahmEoKGyJgKDWOIXGkBwGFmJJcHkWoWHQJQqGWVoTmmRx+EuJ5eFkIoiHuJBKhWdIQGqB52D2KpgDiaougMIxqyODJrEgbgvi2YgYjKOoumKSpij4FIrFsBg0iyLBKj6RoOmqSwmimMpkCqGpOiibQJCaII0mmWxWFCJotgoXpahWaRLHaEY3mWag6mKIpuEmFoIjmaBbiYbIgi6RhaH+O5Onmcpyh2VYAAEASAg")
oGrid.DrawGridLines = 1
oGrid.DataSource = rs
oGrid.SortBarVisible = .t.
oGrid.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
oGrid.AllowGroupBy = .t.
var_Column = oGrid.Columns.Item(1)
	var_Column.GroupByFormatCell = "'EmployeeID: ' + <caption> + '<br><font ;7><fgcolor=808080>Count: ' + value"
oGrid.EndUpdate()

764
How can I remove or change the line it shows for grouped items

' Occurs after a new Item has been inserted to Items collection.
function AddItem as v (Item  as  OLE::Exontrol.Grid.1::HITEM)
	Dim var_Items as local
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	' oGrid.Items.ItemDividerLine(Item) = 0
	var_Items = oGrid.Items
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ItemDividerLine(Item) = 0"

end function

Dim oGrid as P
Dim rs as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.SortBarVisible = .t.
oGrid.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
oGrid.AllowGroupBy = .t.
oGrid.EndUpdate()

763
Is it possible to determine whether an item is regular or a group by item
' Occurs when the user moves the mouse.
function MouseMove as v (Button  as  N,Shift  as  N,X  as  OLE::Exontrol.Grid.1::OLE_XPOS_PIXELS,Y  as  OLE::Exontrol.Grid.1::OLE_YPOS_PIXELS)
	Dim h as N
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	h = oGrid.ItemFromPoint(-1,-1,c,hit)
	? oGrid.Items.GroupItem(h) 
end function

Dim oGrid as P
Dim rs as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.SortBarVisible = .t.
oGrid.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
oGrid.AllowGroupBy = .t.
oGrid.EndUpdate()

762
How can I collapse all items when the user performs a grouping

' Occurs after a new Group Item has been inserted to Items collection.
function AddGroupItem as v (Item  as  OLE::Exontrol.Grid.1::HITEM)
	Dim var_Items as local
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	' oGrid.Items.ExpandItem(Item) = .f.
	var_Items = oGrid.Items
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ExpandItem(Item) = False"

end function

Dim oGrid as P
Dim rs as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.SortBarVisible = .t.
oGrid.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
oGrid.AllowGroupBy = .t.
oGrid.EndUpdate()

761
Is it possible to select columns that user can drop to the sort bar, when using the Group By feature

Dim oGrid as P
Dim rs as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.SortBarVisible = .t.
oGrid.SortBarCaption = "<fgcolor=FF0000>Try to drag the EmployeeID column here."
oGrid.AllowGroupBy = .t.
oGrid.Columns.Item(1).AllowGroupBy = .f.
oGrid.EndUpdate()

760
How can I enable the Group By support, with no sort bar

Dim oGrid as P
Dim rs as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.SingleSort = .f.
oGrid.AllowGroupBy = .t.
oGrid.Columns.Item(1).SortOrder = .t.
oGrid.EndUpdate()

759
Does your control support Group-By feature

Dim oGrid as P
Dim rs as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.SortBarVisible = .t.
oGrid.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
oGrid.AllowGroupBy = .t.
oGrid.EndUpdate()

758
How can I restrict a field to number only (Method 3, Float)

Dim oGrid as P
Dim var_Editor as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
var_Editor = oGrid.Columns.Add("Numbers").Editor
	var_Editor.EditType = 1
	var_Editor.Numeric = 1
oGrid.Items.AddItem(12)

757
How can I restrict a field to number only (Method 2, Integer only)

Dim oGrid as P
Dim var_Editor as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
var_Editor = oGrid.Columns.Add("Numbers").Editor
	var_Editor.EditType = 1
	var_Editor.Numeric = -1
oGrid.Items.AddItem(12)

756
How can I restrict a field to number only (Method 1)

Dim oGrid as P
Dim var_Editor as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
var_Editor = oGrid.Columns.Add("Numbers").Editor
	var_Editor.EditType = 8
	var_Editor.Mask = "###.###"
oGrid.Items.AddItem(12)

755
Is it possible to include only leaf items ( items with no childs ) in the drop down list

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
var_Column = oGrid.Columns.Add("Items")
	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterPattern = .f.
	var_Column.FilterList = 1315 'exShowFocusItem + exShowCheckBox + exSortItemsAsc + exLeafItems
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	var_Items.InsertItem(h,,"Child 3")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

oGrid.EndUpdate()

754
I have several columns, but noticed that the filter is using AND between columns, but I need OR clause for filtering. Is it possible

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
var_Column = oGrid.Columns.Add("Item")
	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterPattern = .f.
	var_Column.Filter = "Child 1"
	var_Column.FilterType = 240
var_Column1 = oGrid.Columns.Add("Date")
	var_Column1.DisplayFilterButton = .t.
	var_Column1.DisplayFilterPattern = .f.
	var_Column1.DisplayFilterDate = .t.
	var_Column1.FilterList = 9474 'exShowExclude + exShowFocusItem + exShowCheckBox + exNoItems
	var_Column1.Filter = {12/28/2010}
	var_Column1.FilterType = 4
oGrid.FilterCriteria = "%0 or %1"
oGrid.Template = "Description(23) = `<font ;18><fgcolor=FF0000>or</fgcolor></font>`" // oGrid.Description(23) = "<font ;18><fgcolor=FF0000>or</fgcolor></font>"
oGrid.Template = "Description(11) = `<font ;18><fgcolor=FF0000>and</fgcolor></font>`" // oGrid.Description(11) = "<font ;18><fgcolor=FF0000>and</fgcolor></font>"
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	' var_Items.CellValue(var_Items.InsertItem(h,,"Child 1"),1) = {12/27/2010}
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(InsertItem(h,,`Child 1`),1) = #12/27/2010#"

	' var_Items.CellValue(var_Items.InsertItem(h,,"Child 2"),1) = {12/28/2010}
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(InsertItem(h,,`Child 2`),1) = #12/28/2010#"

	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("Root 2")
	' var_Items.CellValue(var_Items.InsertItem(h,,"Child 1"),1) = {12/29/2010}
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(InsertItem(h,,`Child 1`),1) = #12/29/2010#"

	' var_Items.CellValue(var_Items.InsertItem(h,,"Child 2"),1) = {12/30/2010}
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(InsertItem(h,,`Child 2`),1) = #12/30/2010#"

oGrid.ApplyFilter()
oGrid.EndUpdate()

753
Is it possible exclude the dates being selected in the drop down filter window

Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_Column = oGrid.Columns.Add("Date")
	var_Column.SortType = 2
	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterPattern = .f.
	var_Column.DisplayFilterDate = .t.
	var_Column.FilterList = 9474 'exShowExclude + exShowFocusItem + exShowCheckBox + exNoItems
var_Items = oGrid.Items
	var_Items.AddItem({12/27/2010})
	var_Items.AddItem({12/28/2010})
	var_Items.AddItem({12/29/2010})
	var_Items.AddItem({12/30/2010})
	var_Items.AddItem({12/31/2010})
oGrid.EndUpdate()

752
How can I display a calendar control inside the drop down filter window

Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_Column = oGrid.Columns.Add("Date")
	var_Column.SortType = 2
	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterPattern = .f.
	var_Column.DisplayFilterDate = .t.
	var_Column.FilterList = 1282 'exShowFocusItem + exShowCheckBox + exNoItems
var_Items = oGrid.Items
	var_Items.AddItem({12/27/2010})
	var_Items.AddItem({12/28/2010})
	var_Items.AddItem({12/29/2010})
	var_Items.AddItem({12/30/2010})
	var_Items.AddItem({12/31/2010})
oGrid.EndUpdate()

751
Is it possible to include the dates as checkb-boxes in the drop down filter window

Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_Column = oGrid.Columns.Add("Dates")
	var_Column.SortType = 2
	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterPattern = .t.
	var_Column.DisplayFilterDate = .t.
	var_Column.FilterList = 1280 'exShowFocusItem + exShowCheckBox
	var_Column.Filter = "to 12/27/2010"
	var_Column.FilterType = 4
var_Items = oGrid.Items
	var_Items.AddItem({12/27/2010})
	var_Items.AddItem({12/28/2010})
	var_Items.AddItem({12/29/2010})
	var_Items.AddItem({12/30/2010})
	var_Items.AddItem({12/31/2010})
oGrid.ApplyFilter()
oGrid.EndUpdate()

750
How can I filter items for dates before a specified date

Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_Column = oGrid.Columns.Add("Dates")
	var_Column.SortType = 2
	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterPattern = .t.
	var_Column.DisplayFilterDate = .t.
	var_Column.FilterList = 1026 'exShowFocusItem + exNoItems
	var_Column.Filter = "to 12/27/2010"
	var_Column.FilterType = 4
var_Items = oGrid.Items
	var_Items.AddItem({12/27/2010})
	var_Items.AddItem({12/28/2010})
	var_Items.AddItem({12/29/2010})
	var_Items.AddItem({12/30/2010})
	var_Items.AddItem({12/31/2010})
oGrid.ApplyFilter()
oGrid.EndUpdate()

749
Is it possible to filter dates

Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_Column = oGrid.Columns.Add("Dates")
	var_Column.SortType = 2
	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterPattern = .t.
	var_Column.DisplayFilterDate = .t.
	var_Column.FilterList = 1026 'exShowFocusItem + exNoItems
var_Items = oGrid.Items
	var_Items.AddItem({12/27/2010})
	var_Items.AddItem({12/28/2010})
	var_Items.AddItem({12/29/2010})
	var_Items.AddItem({12/30/2010})
	var_Items.AddItem({12/31/2010})
oGrid.EndUpdate()

748
Is it possible to change the Exclude field name to something different, in the drop down filter window

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.Template = "Description(25) = `Leaving out`" // oGrid.Description(25) = "Leaving out"
var_Column = oGrid.Columns.Add("Items")
	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterPattern = .f.
	var_Column.FilterList = 9472 'exShowExclude + exShowFocusItem + exShowCheckBox
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,,"Child 1")
oGrid.EndUpdate()

747
How can I display the Exclude field in the drop down filter window

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
var_Column = oGrid.Columns.Add("Items")
	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterPattern = .f.
	var_Column.FilterList = 9472 'exShowExclude + exShowFocusItem + exShowCheckBox
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,,"Child 1")
oGrid.EndUpdate()

746
Is it possible to show and ensure the focused item from the control, in the drop down filter window

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
var_Column = oGrid.Columns.Add("Items")
	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterPattern = .f.
	var_Column.FilterList = 1280 'exShowFocusItem + exShowCheckBox
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,,"Child 1")
	' var_Items.SelectItem(var_Items.InsertItem(h,,"Child 2")) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.SelectItem(InsertItem(h,,`Child 2`)) = True"

	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

oGrid.EndUpdate()

745
Is it possible to show only blanks items with no listed items from the control

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
var_Column = oGrid.Columns.Add("Items")
	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterPattern = .f.
	var_Column.FilterList = 16386 'exShowBlanks + exNoItems
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
oGrid.EndUpdate()

744
How can I include the blanks items in the drop down filter window

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
var_Column = oGrid.Columns.Add("Items")
	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterPattern = .f.
	var_Column.FilterList = 16640 'exShowBlanks + exShowCheckBox
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
oGrid.EndUpdate()

743
How can I select multiple items in the drop down filter window, using check-boxes

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
var_Column = oGrid.Columns.Add("Items")
	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterPattern = .f.
	var_Column.FilterList = 256
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
oGrid.EndUpdate()

742
Is it possible to allow a single item being selected in the drop down filter window

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
var_Column = oGrid.Columns.Add("Items")
	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterPattern = .f.
	var_Column.FilterList = 128
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
oGrid.EndUpdate()

741
How can I display no (All) item in the drop down filter window

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.Template = "Description(0) = ``" // oGrid.Description(0) = ""
var_Column = oGrid.Columns.Add("Items")
	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterPattern = .t.
	var_Column.FilterList = 2
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
oGrid.EndUpdate()

740
Is it possible to display no items in the drop down filter window, so only the pattern is visible

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
var_Column = oGrid.Columns.Add("Items")
	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterPattern = .t.
	var_Column.FilterList = 2
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
oGrid.EndUpdate()

739
How can I show the child items with no identation

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.LinesAtRoot = 5
oGrid.Indent = 12
oGrid.HasLines = 2
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	var_Items.InsertItem(h,,"Child 3")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	var_Items.InsertItem(h,,"Child 3")

738
Is there other ways of showing the hierarchy lines (exGroupLinesAtRoot)

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.LinesAtRoot = 1
oGrid.Indent = 12
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	var_Items.InsertItem(h,,"Child 3")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"


737
Is there other ways of showing the hierarchy lines (exGroupLinesOutside)

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.LinesAtRoot = 5
oGrid.Indent = 12
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	var_Items.InsertItem(h,,"Child 3")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	var_Items.InsertItem(h,,"Child 3")

736
Is there other ways of showing the hierarchy lines (exGroupLinesInsideLeaf)

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.LinesAtRoot = 4
oGrid.Indent = 12
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	var_Items.InsertItem(h,,"Child 3")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"


735
Is there other ways of showing the hierarchy lines (exGroupLinesInside)

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.LinesAtRoot = 3
oGrid.Indent = 12
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	var_Items.InsertItem(h,,"Child 3")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"


734
Is there other ways of showing the hierarchy lines (exGroupLines)

Dim h as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.LinesAtRoot = 2
oGrid.Indent = 12
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(var_Items.InsertItem(h,,"Child 2"),,"SubChild 2")
	var_Items.InsertItem(h,,"Child 3")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"


733
Is it possible to display a column with buttons when using exCRD format

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Column3 as P
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.DrawGridLines = -2
oGrid.DefaultItemHeight = 36
oGrid.FullRowSelect = 0
var_Columns = oGrid.Columns
	var_Column = var_Columns.Add("Column1")
		var_Column.Visible = .f.
		var_Column.Editor.EditType = 1
	var_Column1 = var_Columns.Add("Column2")
		var_Column1.Visible = .f.
		var_Column1.Editor.EditType = 1
	var_Column2 = var_Columns.Add("Column3")
		var_Column2.Alignment = 1
		var_Column2.HeaderAlignment = 1
		var_Column2.Visible = .f.
		' var_Column2.Def(2) = .t.
		oGrid.TemplateDef = "dim var_Column2"
		oGrid.TemplateDef = var_Column2
		oGrid.Template = "var_Column2.Def(2) = True"

		' var_Column2.Def(3) = .t.
		oGrid.TemplateDef = "dim var_Column2"
		oGrid.TemplateDef = var_Column2
		oGrid.Template = "var_Column2.Def(3) = True"

	var_Column3 = var_Columns.Add("FormatLevel")
		var_Column3.FormatLevel = "(0/1),2:64"
		' var_Column3.Def(32) = var_Column3.FormatLevel
		oGrid.TemplateDef = "dim var_Column3"
		oGrid.TemplateDef = var_Column3
		oGrid.Template = "var_Column3.Def(32) = FormatLevel"

var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1.1")
	' var_Items.CellValue(h,1) = "Cell 1.2"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `Cell 1.2`"

	' var_Items.CellValue(h,2) = "Cell 1.3"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = `Cell 1.3`"

	h = var_Items.AddItem("Cell 2.1")
	' var_Items.CellValue(h,1) = "Cell 2.2"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `Cell 2.2`"

	' var_Items.CellValue(h,2) = "Cell 2.3"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = `Cell 2.3`"

oGrid.EndUpdate()

732
How can I change the check-boxes appearance

Dim h as N
Dim oGrid as P
Dim var_Appearance as P
Dim var_Column as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.LinesAtRoot = -1
var_Column = oGrid.Columns.Add("Default")
	' var_Column.Def(0) = .t.
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
var_Items = oGrid.Items
	h = var_Items.AddItem("Root")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

var_Appearance = oGrid.VisualAppearance
	var_Appearance.Add(1,"XP:Button 3 12")
	var_Appearance.Add(2,"XP:Button 3 11")
	var_Appearance.Add(3,"XP:Button 3 10")
oGrid.Template = "CheckImage(0) = 16777216" // oGrid.CheckImage(0) = 16777216
oGrid.Template = "CheckImage(1) = 33554432" // oGrid.CheckImage(1) = 33554432
oGrid.Template = "CheckImage(2) = 50331648" // oGrid.CheckImage(2) = 50331648

731
Is it possible to disable the cell's editor context menu
Dim oGrid as P
Dim var_Editor as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
var_Editor = oGrid.Columns.Add("Edit").Editor
	var_Editor.EditType = 1
	' var_Editor.Option(202) = .f.
	oGrid.TemplateDef = "dim var_Editor"
	oGrid.TemplateDef = var_Editor
	oGrid.Template = "var_Editor.Option(202) = False"

var_Items = oGrid.Items
	var_Items.AddItem(10)
	var_Items.AddItem(20)

730
How can I find a value in a drop down editor

Dim oGrid as P
Dim var_Editor as P
Dim var_Editor1 as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
var_Editor = oGrid.Columns.Add("DropDownList").Editor
	var_Editor.EditType = 3
	var_Editor.AddItem(1,"DDList 1")
	var_Editor.AddItem(2,"DDList 2")
	var_Editor.AddItem(3,"DDList 3")
var_Editor1 = oGrid.Columns.Add("DropDown").Editor
	var_Editor1.EditType = 2
	var_Editor1.AddItem(1,"DDType 1")
	var_Editor1.AddItem(2,"DDType 2")
	var_Editor1.AddItem(3,"DDType 3")
var_Items = oGrid.Items
	' var_Items.CellValue(.AddItem(1),1) = oGrid.Columns.Item(1).Editor.FindItem(1)
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(1),1) = Me.Columns.Item(1).Editor.FindItem(1)"

	' var_Items.CellValue(.AddItem(2),1) = oGrid.Columns.Item(1).Editor.FindItem(2)
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(2),1) = Me.Columns.Item(1).Editor.FindItem(2)"


729
What is the difference between DropDownType and DropDownListType

Dim oGrid as P
Dim var_Editor as P
Dim var_Editor1 as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
var_Editor = oGrid.Columns.Add("DropDownList").Editor
	var_Editor.EditType = 3
	var_Editor.AddItem(1,"First item")
	var_Editor.AddItem(2,"Second item")
	var_Editor.AddItem(3,"Third item")
var_Editor1 = oGrid.Columns.Add("DropDown").Editor
	var_Editor1.EditType = 2
	var_Editor1.AddItem(1,"First item")
	var_Editor1.AddItem(2,"Second item")
	var_Editor1.AddItem(3,"Third item")
var_Items = oGrid.Items
	' var_Items.CellValue(var_Items.AddItem(1),1) = "Any"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(1),1) = `Any`"

	' var_Items.CellValue(var_Items.AddItem(2),1) = "Any"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(2),1) = `Any`"


728
How can I add or change the padding (spaces) for captions in the control's header

Dim oGrid as P
Dim var_Column as local
Dim var_Column1 as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
' oGrid.Columns.Add("Padding-Left").Def(52) = 18
var_Column = oGrid.Columns.Add("Padding-Left")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.Def(52) = 18"

var_Column1 = oGrid.Columns.Add("Padding-Right")
	' var_Column1.Def(53) = 18
	oGrid.TemplateDef = "dim var_Column1"
	oGrid.TemplateDef = var_Column1
	oGrid.Template = "var_Column1.Def(53) = 18"

	var_Column1.HeaderAlignment = 2
oGrid.EndUpdate()

727
Do you have any plans to add cell spacing and cell padding to the cells

Dim oGrid as P
Dim var_Column as P
Dim var_Column1 as local
Dim var_Column2 as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.DrawGridLines = -2
var_Column = oGrid.Columns.Add("Padding-Left")
	' var_Column.Def(0) = .t.
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(0) = True"

	' var_Column.Def(48) = 18
	oGrid.TemplateDef = "dim var_Column"
	oGrid.TemplateDef = var_Column
	oGrid.Template = "var_Column.Def(48) = 18"

' oGrid.Columns.Add("No-Padding").Def(0) = .t.
var_Column1 = oGrid.Columns.Add("No-Padding")
oGrid.TemplateDef = "dim var_Column1"
oGrid.TemplateDef = var_Column1
oGrid.Template = "var_Column1.Def(0) = True"

' oGrid.Columns.Add("Empty").Position = 0
var_Column2 = oGrid.Columns.Add("Empty")
oGrid.TemplateDef = "dim var_Column2"
oGrid.TemplateDef = var_Column2
oGrid.Template = "var_Column2.Position = 0"

var_Items = oGrid.Items
	' var_Items.CellValue(var_Items.AddItem("Item A.1"),1) = "Item A.2"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`Item A.1`),1) = `Item A.2`"

	' var_Items.CellValue(var_Items.AddItem("Item B.1"),1) = "Item B.2"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`Item B.1`),1) = `Item B.2`"

	' var_Items.CellValue(var_Items.AddItem("Item C.1"),1) = "Item C.2"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`Item C.1`),1) = `Item C.2`"

oGrid.EndUpdate()

726
Is it possible to change the height for all items at once

Dim h as N
Dim oGrid as P
Dim var_Items as P
Dim var_Items1 as local

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.LinesAtRoot = -1
oGrid.Columns.Add("Items")
var_Items = oGrid.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(0) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ExpandItem(0) = True"

oGrid.EndUpdate()
oGrid.DefaultItemHeight = 12
' oGrid.Items.ItemHeight(0) = 12
var_Items1 = oGrid.Items
oGrid.TemplateDef = "dim var_Items1"
oGrid.TemplateDef = var_Items1
oGrid.Template = "var_Items1.ItemHeight(0) = 12"


725
Can I display somehow the filter just on the top of the list, with an editor associated to each column

' Occurs when the user changes the cell's content.
function Change as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,NewValue  as  A)
	Dim var_Column as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "Locked:" 
	? oGrid.Items.IsItemLocked(Item) 
	var_Column = oGrid.Columns.Item(ColIndex)
		var_Column.Filter = NewValue
		var_Column.FilterType = 3
	oGrid.ApplyFilter()
end function

' Occurs when the user releases a mouse button.
function MouseUp as v (Button  as  N,Shift  as  N,X  as  OLE::Exontrol.Grid.1::OLE_XPOS_PIXELS,Y  as  OLE::Exontrol.Grid.1::OLE_YPOS_PIXELS)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Edit(oGrid.Items.LockedItem(0,0))
end function

Dim h as N
Dim oGrid as P
Dim rs as P
Dim var_Editor as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.ColumnAutoResize = .f.
oGrid.ScrollBySingleLine = .t.
oGrid.ContinueColumnScroll = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
var_Items = oGrid.Items
	' var_Items.LockedItemCount(0) = 2
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.LockedItemCount(0) = 2"

	h = var_Items.LockedItem(0,0)
	' var_Items.CellEditor(h,0).EditType = 1
	var_Editor = var_Items.CellEditor(h,0)
	oGrid.TemplateDef = "dim var_Editor"
	oGrid.TemplateDef = var_Editor
	oGrid.Template = "var_Editor.EditType = 1"

	h = var_Items.LockedItem(0,1)
	' var_Items.ItemHeight(h) = 4
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemHeight(h) = 4"

	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

	' var_Items.SelectableItem(h) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectableItem(h) = False"


724
Is it possible to display information about the firing events
' Notifies the application once the control fires an event.
function Event as v (EventID  as  N)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? oGrid.EventParam(-2) 
end function

Dim oGrid as P

oGrid = topparent:CONTROL_ACTIVEX1.activex

723
How can I change the layout of my columns when using the exCRD

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Column2 as local
Dim var_Column3 as P
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.DrawGridLines = -2
oGrid.DefaultItemHeight = 36
var_Columns = oGrid.Columns
	var_Column = var_Columns.Add("Column1")
		var_Column.Visible = .f.
		var_Column.Editor.EditType = 1
	var_Column1 = var_Columns.Add("Column2")
		var_Column1.Visible = .f.
		var_Column1.Editor.EditType = 1
	' var_Columns.Add("Column3").Visible = .f.
	var_Column2 = var_Columns.Add("Column3")
	oGrid.TemplateDef = "dim var_Column2"
	oGrid.TemplateDef = var_Column2
	oGrid.Template = "var_Column2.Visible = False"

	var_Column3 = var_Columns.Add("FormatLevel")
		var_Column3.FormatLevel = "(0/1),2"
		' var_Column3.Def(32) = var_Column3.FormatLevel
		oGrid.TemplateDef = "dim var_Column3"
		oGrid.TemplateDef = var_Column3
		oGrid.Template = "var_Column3.Def(32) = FormatLevel"

var_Items = oGrid.Items
	h = var_Items.AddItem("Cell 1.1")
	' var_Items.CellValue(h,1) = "Cell 1.2"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `Cell 1.2`"

	' var_Items.CellValue(h,2) = "Cell 1.3"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = `Cell 1.3`"

	h = var_Items.AddItem("Cell 2.1")
	' var_Items.CellValue(h,1) = "Cell 2.2"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `Cell 2.2`"

	' var_Items.CellValue(h,2) = "Cell 2.3"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,2) = `Cell 2.3`"

oGrid.EndUpdate()

722
Is it possible to scroll the control's content by clicking and moving the mouse up or down

Dim oGrid as P
Dim rs as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
oGrid.ContinueColumnScroll = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.AutoDrag = 16
oGrid.EndUpdate()

721
How can copy and paste the selection to Microsoft Word, any OLE compliant application, as a snapshot
Dim h as N
Dim h1 as N
Dim h2 as N
Dim h3 as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn")
oGrid.Template = "HTMLPicture(`p1`) = `c:\exontrol\images\card.png`" // oGrid.HTMLPicture("p1") = "c:\exontrol\images\card.png"
oGrid.Template = "HTMLPicture(`p2`) = `c:\exontrol\images\sun.png`" // oGrid.HTMLPicture("p2") = "c:\exontrol\images\sun.png"
oGrid.AutoDrag = 11
oGrid.LinesAtRoot = 0
oGrid.HasLines = 2
oGrid.ShowFocusRect = .f.
oGrid.DefaultItemHeight = 26
oGrid.Columns.Add("Task")
var_Items = oGrid.Items
	h = var_Items.AddItem("<img>p1:32</img>Group 1")
	' var_Items.CellValueFormat(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,0) = 1"

	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

	' var_Items.ItemBold(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemBold(h) = True"

	h1 = var_Items.InsertItem(h,,"Task 1")
	h2 = var_Items.InsertItem(h,,"Task 2")
	h3 = var_Items.InsertItem(h,,"Task 3")
	h = var_Items.AddItem("<img>p2:32</img>Group 2")
	' var_Items.CellValueFormat(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,0) = 1"

	' var_Items.ItemBold(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemBold(h) = True"

	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

	h1 = var_Items.InsertItem(h,,"Task")
	' var_Items.ExpandItem(0) = .t.
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.ExpandItem(0) = True"

oGrid.EndUpdate()

720
How can copy and paste the selection to Microsoft Word, any OLE compliant application, as a image

Dim h as N
Dim oGrid as P
Dim rs as P
Dim var_Columns as local
Dim var_Columns1 as local
Dim var_HTMLPicture as 
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.Template = "HTMLPicture(`p1`) = `gCJKBOI4NBQaBQAhQNJJIIhShQAIERFQIA0RAYGLriiIEM5BJpBiIARYlMBNhQPLhJIhBKhoQLlTTLV4la5VYx/fZVOoee7de62drYdI4YIWcIteIQEbEEAzCghEwIRIZKSmJD8EIZMzARgZKYmEAmDISYgEAISIJKdg4JzSOK7bp9b73HiqezeNYxLD7Th7N67dpmQSQIZJUpzVRqT46PY9Xy1yL2Qz/c6HXbzHoAKYgWrzC7tZDtLgBOpzOajQApWDXZwOdABb6eHa+fCHMTCB7AMo7S6AIxMcADcAIfHEe6AQ7/G7zfhfHqeAb/AJ8B6TfITMAVGLrd4Db78aY/fydH77axfPjjS5fP7tcLMY6EOYed4dbyHcwHCoHfAICCApOHEDgcA+OAnACAJgBya5jAoLh5hCc4OGcQ47GeQIBneNoGHaTI5kAKxOHuHAzjGXp5mwAZgnyNB/nCPh9g+ABinGYA1kmGYAAqThjgGQRwHiThPC8Vhfnma5/ngXZvn8ew7keQBfmOUAYCIBj7ngbY/nqS4/nkDYzieXwLn+dp+j+EpiE8CAAEKNwZFOTZ3FCOpgHyRQHkCcAJmUDRzgEHwhAYH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Y0xOjbD3B4B1BUAmClAyAYDFDLDKDqDrB1BKD/BnAADtCOCxD1DLZnCEAAgZAABJBFBOBECuBCBgCCEBA=="
var_HTMLPicture = oGrid.HTMLPicture("aka1")
oGrid.HeaderHeight = 24
oGrid.DefaultItemHeight = 48
oGrid.DrawGridLines = -2
oGrid.GridLineColor = 15790320
oGrid.SelBackMode = 1
oGrid.ColumnAutoResize = .f.
oGrid.ContinueColumnScroll = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
' oGrid.Columns.Item(0).Def(17) = 1
var_Columns = oGrid.Columns.Item(0)
oGrid.TemplateDef = "dim var_Columns"
oGrid.TemplateDef = var_Columns
oGrid.Template = "var_Columns.Def(17) = 1"

oGrid.Columns.Item(0).FormatColumn = "value + ` <img>p` + (1 + (value mod 3 ) ) + `</img>`"
oGrid.Columns.Item(0).Width = 112
' oGrid.Columns.Item(1).Def(0) = 1
var_Columns1 = oGrid.Columns.Item(1)
oGrid.TemplateDef = "dim var_Columns1"
oGrid.TemplateDef = var_Columns1
oGrid.Template = "var_Columns1.Def(0) = 1"

oGrid.Columns.Item(2).LevelKey = "1"
oGrid.Columns.Item(3).LevelKey = "1"
oGrid.Columns.Item(4).LevelKey = "1"
oGrid.AutoDrag = 10
oGrid.SingleSel = .f.
var_Items = oGrid.Items
	h = var_Items.ItemByIndex(1)
	' var_Items.SelectItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectItem(h) = True"

	h = var_Items.ItemByIndex(2)
	' var_Items.SelectItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectItem(h) = True"

	h = var_Items.ItemByIndex(3)
	' var_Items.SelectItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectItem(h) = True"

	' var_Items.LockedItemCount(2) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.LockedItemCount(2) = 1"

	h = var_Items.LockedItem(2,0)
	' var_Items.CellValue(h,1) = "<font ;16>Click the selection and <b>wait to start dragging</b>, and then drop to Microsoft Word, ..."
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,1) = `<font ;16>Click the selection and <b>wait to start dragging</b>, and then drop to Microsoft Word, ...`"

	' var_Items.CellSingleLine(h,1) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellSingleLine(h,1) = False"

	' var_Items.CellValueFormat(h,1) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,1) = 1"

	' var_Items.CellHAlignment(h,1) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,1) = 1"

	' var_Items.ItemDivider(h) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 1"

	' var_Items.ItemDividerLineAlignment(h) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDividerLineAlignment(h) = 2"

oGrid.EndUpdate()

719
How can copy and paste the selection to Microsoft Word, Excel or any OLE compliant application, as a text

Dim h as N
Dim oGrid as P
Dim rs as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.ColumnAutoResize = .f.
oGrid.ContinueColumnScroll = .f.
rs = OLE.Create("ADOR.Recordset")
	rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExGrid\Sample\Access\misc.accdb",3,3)
oGrid.DataSource = rs
oGrid.Columns.Item(2).LevelKey = "1"
oGrid.Columns.Item(3).LevelKey = "1"
oGrid.Columns.Item(4).LevelKey = "1"
oGrid.AutoDrag = 9
oGrid.SingleSel = .f.
var_Items = oGrid.Items
	h = var_Items.ItemByIndex(1)
	' var_Items.SelectItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectItem(h) = True"

	h = var_Items.ItemByIndex(3)
	' var_Items.SelectItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectItem(h) = True"

	h = var_Items.ItemByIndex(4)
	' var_Items.SelectItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectItem(h) = True"

	h = var_Items.ItemByIndex(5)
	' var_Items.SelectItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.SelectItem(h) = True"

	' var_Items.LockedItemCount(2) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.LockedItemCount(2) = 1"

	h = var_Items.LockedItem(2,0)
	' var_Items.CellValue(h,0) = "<font ;16>Click the selection and <b>wait to start dragging</b>, and then drop to Microsoft Word, Excel, ..."
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,0) = `<font ;16>Click the selection and <b>wait to start dragging</b>, and then drop to Microsoft Word, Excel, ...`"

	' var_Items.CellSingleLine(h,0) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellSingleLine(h,0) = False"

	' var_Items.CellValueFormat(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,0) = 1"

	' var_Items.CellHAlignment(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,0) = 1"

	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

	' var_Items.ItemDividerLineAlignment(h) = 2
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDividerLineAlignment(h) = 2"

oGrid.EndUpdate()

718
Is it possible to change the indentation during the drag and drop

Dim h as N
Dim h1 as N
Dim h2 as N
Dim h3 as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn")
oGrid.AutoDrag = 3
oGrid.LinesAtRoot = 0
oGrid.HasLines = 1
oGrid.HasButtons = 3
oGrid.ShowFocusRect = .f.
oGrid.SelBackMode = 1
oGrid.Columns.Add("Task")
var_Items = oGrid.Items
	h = var_Items.AddItem("Group 1")
	' var_Items.ItemBold(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemBold(h) = True"

	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

	h1 = var_Items.InsertItem(h,,"Task 1")
	h2 = var_Items.InsertItem(h1,,"Task 2")
	h2 = var_Items.InsertItem(h1,,"Task 3")
	h3 = var_Items.InsertItem(h,,"Task 3")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.ExpandItem(h1) = .t.
	oGrid.TemplateDef = "dim var_Items,h1"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h1
	oGrid.Template = "var_Items.ExpandItem(h1) = True"

	h = var_Items.AddItem("Group 2")
	' var_Items.ItemBold(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemBold(h) = True"

	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

	' var_Items.LockedItemCount(2) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.LockedItemCount(2) = 1"

	h = var_Items.LockedItem(2,0)
	' var_Items.CellValue(h,0) = "Click a row, and move by dragging <b>up, down</b> to change the row's parent or <b>left,right</b> to increase or decrease the indentation."
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,0) = `Click a row, and move by dragging <b>up, down</b> to change the row's parent or <b>left,right</b> to increase or decrease the indentation.`"

	' var_Items.CellSingleLine(h,0) = .f.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellSingleLine(h,0) = False"

	' var_Items.CellValueFormat(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValueFormat(h,0) = 1"

oGrid.EndUpdate()

717
Is it possible to allow moving an item to another, but keeping its indentation

Dim h as N
Dim h1 as N
Dim h2 as N
Dim h3 as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn")
oGrid.AutoDrag = 2
oGrid.LinesAtRoot = 0
oGrid.HasLines = 2
oGrid.ShowFocusRect = .f.
oGrid.Columns.Add("Task")
var_Items = oGrid.Items
	h = var_Items.AddItem("Group 1")
	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

	' var_Items.ItemBold(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemBold(h) = True"

	h1 = var_Items.InsertItem(h,,"Task 1")
	h2 = var_Items.InsertItem(h,,"Task 2")
	h3 = var_Items.InsertItem(h,,"Task 3")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("Group 2")
	' var_Items.ItemBold(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemBold(h) = True"

	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

oGrid.EndUpdate()

716
How can I change the row's position to another, by drag and drop. Is it possible

Dim h1 as N
Dim h2 as N
Dim h3 as N
Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.VisualAppearance.Add(1,"c:\exontrol\images\normal.ebn")
oGrid.AutoDrag = 1
oGrid.Columns.Add("Task")
var_Items = oGrid.Items
	h1 = var_Items.AddItem("Task 1")
	h2 = var_Items.AddItem("Task 2")
	h3 = var_Items.AddItem("Task 3")
oGrid.EndUpdate()

715
Is it possible background color displayed when the mouse passes over an item

Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.Columns.Add("Def")
oGrid.HotBackColor = 8388608
oGrid.HotForeColor = 16777215
var_Items = oGrid.Items
	var_Items.AddItem("Item A")
	var_Items.AddItem("Item B")
	var_Items.AddItem("Item C")
oGrid.EndUpdate()

714
My development environment does not have any Object,GetOcx,DefaultDispatch,GetControlUnknown,nativeObject, ... property, is there any alternative I can pass the component to PrintExt so I can get printed

Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.Columns.Add("Task")
var_Items = oGrid.Items
	var_Items.AddItem("Task 1")
	var_Items.AddItem("Task 2")
oGrid.EndUpdate()
oGrid.Template = "Dim p;p = CreateObject(`Exontrol.Print`);p.PrintExt = Me;p.AutoRelease = False;p.Preview();"

713
My development environment does not have any Object,GetOcx,DefaultDispatch,GetControlUnknown,nativeObject, ... property, is there any alternative I can pass the component to PrintExt so I can get printed

Dim oGrid as P
Dim var_Items as P
Dim var_Print as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	var_Items.AddItem("Item 1")
	var_Items.AddItem("Task 2")
oGrid.EndUpdate()
var_Print = OLE.Create("Exontrol.Print")
	var_Print.PrintExt = oGrid.ExecuteTemplate("me")
	var_Print.Preview()

712
How can I apply the same ConditionalFormat on more than 1(one) column (multiple columns and not on item)

Dim oGrid as P
Dim var_Columns as P
Dim var_ConditionalFormat as P
Dim var_ConditionalFormat1 as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_ConditionalFormat = oGrid.ConditionalFormats.Add("1","K1")
	var_ConditionalFormat.BackColor = 255
	var_ConditionalFormat.ApplyTo = 1 '1 + 
var_ConditionalFormat1 = oGrid.ConditionalFormats.Add("1","K2")
	var_ConditionalFormat1.BackColor = 255
	var_ConditionalFormat1.ApplyTo = 2 '2 + 
oGrid.MarkSearchColumn = .f.
oGrid.DrawGridLines = -2
var_Columns = oGrid.Columns
	var_Columns.Add("Column 1")
	var_Columns.Add("Column 2")
	var_Columns.Add("Column 3")
var_Items = oGrid.Items
	var_Items.AddItem()
	var_Items.AddItem()
	var_Items.AddItem()
oGrid.EndUpdate()

711
Is it possible to add new records and see them in the control's view using the DataSource

' Occurs when user clicks on the cell's button.
function ButtonClick as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,Key  as  A)
	Dim var_Recordset as P
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	var_Recordset = oGrid.DataSource
		var_Recordset.AddNew("Task","New-Task")
		var_Recordset.Update()
end function

' Fired when an internal error occurs.
function Error as v (Error  as  N,Description  as  C)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? Description 
end function

Dim h as N
Dim oGrid as P
Dim rs as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
rs = OLE.Create("ADODB.Recordset")
	rs.Append("Task",8)
	rs.Append("Start",7)
	rs.Append("End",7)
rs.Open()
oGrid.DrawGridLines = -2
oGrid.DetectAddNew = .t.
oGrid.DetectDelete = .t.
oGrid.DataSource = rs
var_Items = oGrid.Items
	' var_Items.LockedItemCount(0) = 1
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.LockedItemCount(0) = 1"

	h = var_Items.LockedItem(0,0)
	' var_Items.ItemDivider(h) = 0
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemDivider(h) = 0"

	' var_Items.ItemHeight(h) = 22
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ItemHeight(h) = 22"

	' var_Items.CellValue(h,0) = "AddNew"
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellValue(h,0) = `AddNew`"

	' var_Items.CellHasButton(h,0) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHasButton(h,0) = True"

	' var_Items.CellHAlignment(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellHAlignment(h,0) = 1"


710
How can I initiate an OLE Drag and Drop operation in /COM version

' Occurs when the OLEDrag method is called.
function OLEStartDrag as v (Data  as  OLE::Exontrol.Grid.1::IExDataObject,AllowedEffects  as  N)
	' Data.SetData("your data to drag")
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	AllowedEffects = 2
end function

Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.Columns.Add("Default")
var_Items = oGrid.Items
	var_Items.AddItem("Item 1")
	var_Items.AddItem("Item 2")
	var_Items.AddItem("Item 3")
	var_Items.AddItem("Item 4")
	var_Items.AddItem("Item 5")
oGrid.OLEDropMode = 1
oGrid.EndUpdate()

709
How can I find the order of the events
' Fired after an item is expanded (collapsed).
function AfterExpandItem as v (Item  as  OLE::Exontrol.Grid.1::HITEM)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "AfterExpandItem" 
	? Item 
end function

' Occurs when an anchor element is clicked.
function AnchorClick as v (AnchorID  as  C,Options  as  C)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "AnchorClick" 
	? AnchorID 
	? Options 
end function

' Fired before an item is about to be expanded (collapsed).
function BeforeExpandItem as v (Item  as  OLE::Exontrol.Grid.1::HITEM,Cancel  as  A)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "BeforeExpandItem" 
	? Item 
end function

' Occurs when user clicks on the cell's button.
function ButtonClick as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,Key  as  A)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "ButtonClick" 
	? Item 
	? ColIndex 
	? Key 
end function

' Fired after the user clicks on the image's cell area.
function CellImageClick as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "CellImageClick" 
	? Item 
	? ColIndex 
end function

' Fired after cell's state has been changed.
function CellStateChanged as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "CellStateChanged" 
	? Item 
	? ColIndex 
end function

' Occurs when the user changes the cell's content.
function Change as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,NewValue  as  A)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "Change" 
	? Item 
	? ColIndex 
	? NewValue 
end function

' Occurs when the user presses and then releases the left mouse button over the grid control.
function Click as v ()
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "Click" 
end function

' Fired after the user clicks on column's header.
function ColumnClick as v (Column  as  OLE::Exontrol.Grid.1::IColumn)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "ColumnClick" 
end function

' Occurs when the user dblclk the left mouse button over an object.
function DblClick as v (Shift  as  N,X  as  OLE::Exontrol.Grid.1::OLE_XPOS_PIXELS,Y  as  OLE::Exontrol.Grid.1::OLE_YPOS_PIXELS)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "DblClick" 
	? Shift 
	? X 
	? Y 
	oGrid.Edit()
end function

' Occurs just before editing the focused cell.
function Edit as v (Item  as  OLE::Exontrol.Grid.1::HITEM,ColIndex  as  N,Cancel  as  L)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "Edit" 
	? Item 
	? ColIndex 
end function

' Occurs when the edit operation ends.
function EditClose as v ()
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "EditClose" 
end function

' Occurs when the edit operation starts.
function EditOpen as v ()
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "EditOpen" 
end function

' Occurs when filter was changed.
function FilterChange as v ()
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "FilterChange" 
end function

' Notifies your application that the filter is about to change.
function FilterChanging as v ()
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "FilterChanging" 
end function

' Occurs when a new cell is focused.
function FocusChanged as v ()
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "FocusChanged" 
end function

' Occurs when the user presses a key while an object has the focus.
function KeyDown as v (KeyCode  as  N,Shift  as  N)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "KeyDown" 
	? KeyCode 
	? Shift 
end function

' Occurs when the user presses and releases an ANSI key.
function KeyPress as v (KeyAscii  as  N)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "KeyPress" 
	? KeyAscii 
end function

' Occurs when the user releases a key while an object has the focus.
function KeyUp as v (KeyCode  as  N,Shift  as  N)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "KeyUp" 
	? KeyCode 
	? Shift 
end function

' Occurs when column's position or column's size is changed.
function LayoutChanged as v ()
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "LayoutChanged" 
end function

' Occurs when the user presses a mouse button.
function MouseDown as v (Button  as  N,Shift  as  N,X  as  OLE::Exontrol.Grid.1::OLE_XPOS_PIXELS,Y  as  OLE::Exontrol.Grid.1::OLE_YPOS_PIXELS)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "MouseDown" 
	? Button 
	? Shift 
	? X 
	? Y 
end function

' Occurs when the user moves the mouse.
function MouseMove as v (Button  as  N,Shift  as  N,X  as  OLE::Exontrol.Grid.1::OLE_XPOS_PIXELS,Y  as  OLE::Exontrol.Grid.1::OLE_YPOS_PIXELS)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
end function

' Occurs when the user releases a mouse button.
function MouseUp as v (Button  as  N,Shift  as  N,X  as  OLE::Exontrol.Grid.1::OLE_XPOS_PIXELS,Y  as  OLE::Exontrol.Grid.1::OLE_YPOS_PIXELS)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "MouseUp" 
	? Button 
	? Shift 
	? X 
	? Y 
end function

' Occurs when the scroll position has been changed.
function OffsetChanged as v (Horizontal  as  L,NewVal  as  N)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "OffsetChanged" 
	? Horizontal 
	? NewVal 
end function

' Occurs when the right range of the scroll has been changed.
function OversizeChanged as v (Horizontal  as  L,NewVal  as  N)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "OversizeChanged" 
	? Horizontal 
	? NewVal 
end function

' Fired when right mouse button is clicked
function RClick as v ()
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "RClick" 
end function

' Occurs when the user clicks a button in the scrollbar.
function ScrollButtonClick as v (ScrollBar  as  OLE::Exontrol.Grid.1::ScrollBarEnum,ScrollPart  as  OLE::Exontrol.Grid.1::ScrollPartEnum)
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "ScrollButtonClick" 
	? ScrollBar 
	? ScrollPart 
end function

' Fired after a new item has been selected.
function SelectionChanged as v ()
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "SelectionChanged" 
end function

' Fired when the control sorts a column.
function Sort as v ()
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	? "Sort" 
end function

Dim h as N
Dim oGrid as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.Images("gBJJgBAIEAAGAEGCAAhb/hz/EIAh8Tf5CJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1BAmBhOCwMGwuDw2ExWJxmIx2HyGLv+TlykUCgABmGYzzObzuczWcKujzOa0ug02hz+r1Wtz2qoCA2QAYG1yk02YA3NMy2Yh8Sh202zx4gA4jxADM5XG4vHACy6ESdjM6XUZiZTMS5bwZSm1c83+yQHCYHk81Q8O7qW18u/9NG3vAf/y83u4PQWQA0ZVADq/z6um6rkuw7TqH+5bYJu+z5vE8z2N02cGweoDfwfCrbQfBqkNzBb6QfDLxp6+LlOs5cSOTEzlm7FYACFFwADvGIAGvGjzOu7MbwHHECQSmUOvS8cGwk20gQc2ycQs4MLvLD8MNtDSfyS+cmyZJzywa96axzDsTw6/x1AAL8xRbF8Vm65jkH/AL8QFNTqR6lsfuDIb2uDKTzTo88FTtIk+PK3SNRDKiew5JVDSnK08NnOUGRClkt0PFEDUjMwAENS4AM2zj4udNznujT1PTgjdGQg8c71RPtESvCL1JrO8lozQUj1nP6d1TKtc0U8dS1jCaNRzGhrxnGthWJYdjUrYwc2ZMMx2NB8czZNk4VLPMstzXD6Q6mltVjPNAT0m1CvnDtBxBXlI3PRKNzZDtjQ6cd5TQ/TSU0/r/udC0A1Ez1SUja8/QhWVavrSLfpxWNzXZR2CygmVtXXVl03Lg+BV+lV3UjeDgzEL4AXkcb6Pje5LZNDzhuLfrOX/RtT0TQbc5lENSvBi2K5xlFdUHhN1ZhJ9F59WybOU7NjWTFkvxhGT9zIIQAWYHIABFqmnABSsT0HUaNYlI1dZmjNuUDRybzvIVWyDoOc54n8Oyxm9Ta9cSUaLbbg44+b4xiO9nY/pt73u38Tuc52tpdruYxDVyUbBV+gYpu2c7PyGMKTt21cjnW6OvzO8PppUvP/Ljlt/wt/Vvn+v8V1eCdbgaa7fnMi8vyD0TnzGEJXyp/wJ3js98iXe+F3/hwGM3jeQZjTeUznmOT5bTKJyqYcbm2c5bzXpqvsWw4FUkCO473wgB8cD9/znzO14n1+D4/efcTP4fl5+WKvxbbptmqV+B/ni/68R4514AvxeTAR50B3oPNei/iBhFgfErgeR4kBIiSAAJKSiC7PT5wMKIQ4fwfyHDzg2PwD4/B/jgg2PgA48AfjgB+RkeAARwAPGAA8jI4AADgAOMAAZGTyw6YbDkA7ZDaAHgxDyCxGgBw8EBBmJcS4LjAATDweBGoqjgAGP4jQ/AcjwAHBsiQex8gPH+MF7pDxxkB")
oGrid.DrawGridLines = -1
oGrid.LinesAtRoot = -1
oGrid.GridLineStyle = 4
oGrid.AutoEdit = .f.
oGrid.ExpandOnDblClick = .f.
var_Columns = oGrid.Columns
	var_Column = var_Columns.Add("Column")
		var_Column.DisplayFilterButton = .t.
		' var_Column.Def(0) = .t.
		oGrid.TemplateDef = "dim var_Column"
		oGrid.TemplateDef = var_Column
		oGrid.Template = "var_Column.Def(0) = True"

		var_Column.Editor.EditType = 1
	var_Column1 = var_Columns.Add("Button")
		var_Column1.AllowSizing = .f.
		var_Column1.Width = 18
		' var_Column1.Def(2) = .t.
		oGrid.TemplateDef = "dim var_Column1"
		oGrid.TemplateDef = var_Column1
		oGrid.Template = "var_Column1.Def(2) = True"

var_Items = oGrid.Items
	h = var_Items.AddItem("parent")
	' var_Items.CellImage(h,0) = 1
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.CellImage(h,0) = 1"

	var_Items.InsertItem(h,"","child")
	' var_Items.ExpandItem(h) = .t.
	oGrid.TemplateDef = "dim var_Items,h"
	oGrid.TemplateDef = var_Items
	oGrid.TemplateDef = h
	oGrid.Template = "var_Items.ExpandItem(h) = True"

oGrid.EndUpdate()

708
Is it possible to select a column instead sorting it

' Fired after the user clicks on column's header.
function ColumnClick as v (Column  as  OLE::Exontrol.Grid.1::IColumn)
	' Column.Selected = True
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.BeginUpdate()
	oGrid.Columns.Item(0).Selected = .f.
	oGrid.Columns.Item(1).Selected = .f.
	oGrid.Items.SelectAll()
	oGrid.EndUpdate()
end function

Dim oGrid as P
Dim var_Columns as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.MarkSearchColumn = .f.
oGrid.ShowFocusRect = .f.
oGrid.SingleSel = .f.
oGrid.FullRowSelect = 1
oGrid.SortOnClick = 0
var_Columns = oGrid.Columns
	var_Columns.Add("Column1")
	var_Columns.Add("Column2")
var_Items = oGrid.Items
	' var_Items.CellValue(var_Items.AddItem("One"),1) = "Three"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`One`),1) = `Three`"

	' var_Items.CellValue(var_Items.AddItem("Two"),1) = "Four"
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(`Two`),1) = `Four`"

	var_Items.SelectAll()
oGrid.EndUpdate()

707
Is it possible to display empty strings for 0 values

Dim oGrid as P
Dim var_Column as P
Dim var_Editor as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
var_Column = oGrid.Columns.Add("Currency")
	var_Column.FormatColumn = "dbl(value) ? currency(dbl(value)) : ``"
	var_Editor = var_Column.Editor
		var_Editor.EditType = 1
		var_Editor.Numeric = 1
var_Items = oGrid.Items
	var_Items.AddItem(1.23)
	var_Items.AddItem(2.34)
	var_Items.AddItem(0)
	var_Items.AddItem(10000.99)

706
Is it possible to display empty strings for 0 values

Dim oGrid as P
Dim var_Column as local
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.Columns.Add("Number")
' oGrid.Columns.Add("Currency").ComputedField = "%0 ? currency(%0) : ``"
var_Column = oGrid.Columns.Add("Currency")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.ComputedField = `%0 ? currency(%0) : `````"

var_Items = oGrid.Items
	var_Items.AddItem(1.23)
	var_Items.AddItem(2.34)
	var_Items.AddItem(0)
	var_Items.AddItem(10000.99)

705
How can I get the list of items as they are displayed

Dim oGrid as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.BackColorAlternate = 15790320
oGrid.Columns.Add("Names")
var_Items = oGrid.Items
	var_Items.AddItem("Mantel")
	var_Items.AddItem("Mechanik")
	var_Items.AddItem("Motor")
	var_Items.AddItem("Murks")
	var_Items.AddItem("Märchen")
	var_Items.AddItem("Möhren")
	var_Items.AddItem("Mühle")
oGrid.Columns.Item(0).SortOrder = 1
oGrid.EndUpdate()
? oGrid.GetItems(1) 

704
Is it possible to add new rows, as I type like in Excel

' Occurs when the edit operation ends.
function EditClose as v ()
	oGrid = topparent:CONTROL_ACTIVEX1.activex
	oGrid.Items.AddItem("")
end function

Dim oGrid as P
Dim var_Editor as local

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.AutoEdit = .t.
' oGrid.Columns.Add("Default").Editor.EditType = 1
var_Editor = oGrid.Columns.Add("Default").Editor
oGrid.TemplateDef = "dim var_Editor"
oGrid.TemplateDef = var_Editor
oGrid.Template = "var_Editor.EditType = 1"

oGrid.FullRowSelect = 0
oGrid.Items.AddItem("")
oGrid.DrawGridLines = -1
oGrid.ScrollBars = 15
oGrid.EndUpdate()

703
Is posible to reduce the size of the picture to be shown in the column's caption

Dim oGrid as P
Dim var_Column as local
Dim var_Column1 as local

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
oGrid.Template = "HTMLPicture(`pic1`) = `c:\exontrol\images\zipdisk.gif`" // oGrid.HTMLPicture("pic1") = "c:\exontrol\images\zipdisk.gif"
oGrid.HeaderHeight = 48
' oGrid.Columns.Add("DefaultSize").HTMLCaption = "Default-Size <img>pic1</img> Picture"
var_Column = oGrid.Columns.Add("DefaultSize")
oGrid.TemplateDef = "dim var_Column"
oGrid.TemplateDef = var_Column
oGrid.Template = "var_Column.HTMLCaption = `Default-Size <img>pic1</img> Picture`"

' oGrid.Columns.Add("CustomSize").HTMLCaption = "Custom-Size <img>pic1:16</img> Picture"
var_Column1 = oGrid.Columns.Add("CustomSize")
oGrid.TemplateDef = "dim var_Column1"
oGrid.TemplateDef = var_Column1
oGrid.Template = "var_Column1.HTMLCaption = `Custom-Size <img>pic1:16</img> Picture`"

oGrid.EndUpdate()

702
How can I change the color, font, bold etc for the items/cells in the same column or for the entire column

Dim oGrid as P
Dim var_Column as P
Dim var_ConditionalFormat as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
oGrid.BeginUpdate()
var_ConditionalFormat = oGrid.ConditionalFormats.Add("1")
	var_ConditionalFormat.Bold = .t.
	var_ConditionalFormat.ForeColor = 255
	var_ConditionalFormat.ApplyTo = 1 '1 + 
oGrid.Columns.Add("C1")
var_Column = oGrid.Columns.Add("C2")
	var_Column.HeaderBold = .t.
	var_Column.HTMLCaption = "<fgcolor=FF0000>C2"
var_Items = oGrid.Items
	' var_Items.CellValue(var_Items.AddItem(10),1) = 11
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(10),1) = 11"

	' var_Items.CellValue(var_Items.AddItem(12),1) = 13
	oGrid.TemplateDef = "dim var_Items"
	oGrid.TemplateDef = var_Items
	oGrid.Template = "var_Items.CellValue(AddItem(12),1) = 13"

oGrid.EndUpdate()

701
How can I filter the check-boxes (method 2)

Dim oGrid as P
Dim var_Column as P
Dim var_Editor as P
Dim var_Items as P

oGrid = topparent:CONTROL_ACTIVEX1.activex
var_Column = oGrid.Columns.Add("Check")
	var_Editor = var_Column.Editor
		var_Editor.EditType = 19
		' var_Editor.Option(17) = 1
		oGrid.TemplateDef = "dim var_Editor"
		oGrid.TemplateDef = var_Editor
		oGrid.Template = "var_Editor.Option(17) = 1"

	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterPattern = .f.
	var_Column.CustomFilter = "checked||-1|||unchecked||0"
var_Items = oGrid.Items
	var_Items.AddItem(.t.)
	var_Items.AddItem(.t.)
	var_Items.AddItem(.f.)
	var_Items.AddItem(.t.)
	var_Items.AddItem(.f.)
	var_Items.AddItem(.t.)
	var_Items.AddItem(.f.)